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

Method CreateJSWrapperHelper

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

Source from the content-addressed store, hash-verified

241}
242
243Local<Object> ObjectManager::CreateJSWrapperHelper(jint javaObjectID,
244 const string& typeName,
245 jclass clazz) {
246 auto isolate = m_isolate;
247
248 auto className = (clazz != nullptr) ? GetClassName(clazz) : typeName;
249
250 auto node = MetadataNode::GetOrCreate(className);
251
252 auto jsWrapper = node->CreateJSWrapper(isolate, this);
253
254 if (!jsWrapper.IsEmpty()) {
255 JEnv env;
256 auto claz = env.FindClass(className);
257 Link(jsWrapper, javaObjectID, claz);
258 }
259 return jsWrapper;
260}
261
262/* *
263 * Link the JavaScript object and it's java counterpart with an ID

Callers

nothing calls this directly

Calls 3

CreateJSWrapperMethod · 0.45
IsEmptyMethod · 0.45
FindClassMethod · 0.45

Tested by

no test coverage detected