MCPcopy Create free account
hub / github.com/NativeScript/android / GetEmptyObject

Method GetEmptyObject

test-app/runtime/src/main/cpp/ObjectManager.cpp:574–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574Local<Object> ObjectManager::GetEmptyObject(Isolate* isolate) {
575 auto emptyObjCtorFunc = Local<Function>::New(isolate, *m_poJsWrapperFunc);
576 auto context = Runtime::GetRuntime(isolate)->GetContext();
577 auto val = emptyObjCtorFunc->CallAsConstructor(context, 0, nullptr);
578 if (val.IsEmpty()) {
579 return Local<Object>();
580 }
581 auto localVal = val.ToLocalChecked();
582 assert(localVal->IsObject());
583 auto obj = localVal.As<Object>();
584 return obj;
585}
586
587void ObjectManager::JSWrapperConstructorCallback(
588 const v8::FunctionCallbackInfo<v8::Value>& info) {

Callers 3

CreateJSWrapperMethod · 0.80

Calls 4

NewFunction · 0.85
GetContextMethod · 0.80
ToLocalCheckedMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected