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

Function func_instance

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

Source from the content-addressed store, hash-verified

308// Functions
309
310auto func_instance(v8::Local<v8::Function> function) -> v8::Local<v8::Object> {
311 auto v8_function = v8::Utils::OpenHandle(*function);
312 auto v8_func = v8::internal::Handle<v8::internal::WasmExportedFunction>::cast(v8_function);
313 auto v8_instance = object_handle(v8::internal::JSObject::cast(v8_func->instance()));
314 return v8::Utils::ToLocal(v8_instance);
315}
316
317
318// Globals

Callers

nothing calls this directly

Calls 2

object_handleFunction · 0.85
instanceMethod · 0.80

Tested by

no test coverage detected