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

Function instance_module

src/wasm-v8-lowlevel.cc:280–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278// Instances
279
280auto instance_module(v8::Local<v8::Object> instance) -> v8::Local<v8::Object> {
281 auto v8_object = v8::Utils::OpenHandle<v8::Object, v8::internal::JSReceiver>(instance);
282 auto v8_instance = v8::internal::Handle<v8::internal::WasmInstanceObject>::cast(v8_object);
283 auto v8_module = object_handle(v8::internal::JSObject::cast(v8_instance->module_object()));
284 return v8::Utils::ToLocal(v8_module);
285}
286
287auto instance_exports(v8::Local<v8::Object> instance) -> v8::Local<v8::Object> {
288 auto v8_object = v8::Utils::OpenHandle<v8::Object, v8::internal::JSReceiver>(instance);

Callers 1

exportsMethod · 0.85

Calls 1

object_handleFunction · 0.85

Tested by

no test coverage detected