Skip to content

Commit

Permalink
src: update blob constructor to support quic
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Aug 27, 2022
1 parent a5c39bd commit f6b6cb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/node_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ bool Blob::HasInstance(Environment* env, v8::Local<v8::Value> object) {
return GetConstructorTemplate(env)->HasInstance(object);
}

BaseObjectPtr<Blob> Blob::Create(
Environment* env,
const std::vector<BlobEntry>& store,
size_t length) {

BaseObjectPtr<Blob> Blob::Create(Environment* env,
const std::vector<BlobEntry>& store,
size_t length) {
HandleScope scope(env->isolate());

Local<Function> ctor;
Expand Down
11 changes: 4 additions & 7 deletions src/node_blob.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ class Blob : public BaseObject {
static v8::Local<v8::FunctionTemplate> GetConstructorTemplate(
Environment* env);

static BaseObjectPtr<Blob> Create(
Environment* env,
const std::vector<BlobEntry>& store,
size_t length);
static BaseObjectPtr<Blob> Create(Environment* env,
const std::vector<BlobEntry>& store,
size_t length);

static bool HasInstance(Environment* env, v8::Local<v8::Value> object);

const std::vector<BlobEntry>& entries() const {
return store_;
}
const std::vector<BlobEntry>& entries() const { return store_; }

void MemoryInfo(MemoryTracker* tracker) const override;
SET_MEMORY_INFO_NAME(Blob)
Expand Down

0 comments on commit f6b6cb7

Please sign in to comment.