MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / make

Method make

src/wasm-v8.cc:1062–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060 }
1061
1062 static auto make(StoreImpl* store, v8::Local<v8::Object> obj) -> own<Ref> {
1063 static_assert(sizeof(RefImpl) == sizeof(v8::Persistent<v8::Object>),
1064 "incompatible object layout");
1065 auto self = static_cast<RefImpl*>(store->make_handle());
1066 if (!self) return nullptr;
1067 self->Reset(store->isolate(), obj);
1068 stats.make(Stats::categorize(*self), self);
1069 return own<Ref>(self);
1070 }
1071
1072 auto copy() const -> own<Ref> {
1073 v8::HandleScope handle_scope(isolate());

Callers

nothing calls this directly

Calls 4

categorizeClass · 0.85
make_handleMethod · 0.80
isolateMethod · 0.45
makeMethod · 0.45

Tested by

no test coverage detected