MCPcopy Create free account
hub / github.com/expo/expo / getObject

Method getObject

packages/expo-modules-core/android/src/main/cpp/JavaScriptValue.cpp:162–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162jni::local_ref<JavaScriptObject::javaobject> JavaScriptValue::getObject() {
163 auto runtime = runtimeHolder.lock();
164 assert((runtime != nullptr) && "JS Runtime was used after deallocation");
165 auto &rawRuntime = runtime->get();
166
167 auto jsObject = std::make_shared<jsi::Object>(jsValue->getObject(rawRuntime));
168 return JavaScriptObject::newInstance(
169 expo::getJSIContext(rawRuntime),
170 runtimeHolder,
171 jsObject
172 );
173}
174
175jni::local_ref<JavaScriptFunction::javaobject> JavaScriptValue::jniGetFunction() {
176 auto runtime = runtimeHolder.lock();

Callers 15

isTypedArrayMethod · 0.45
jniGetFunctionMethod · 0.45
getArrayMethod · 0.45
getTypedArrayMethod · 0.45
toAsyncFunctionMethod · 0.45
createPromiseBodyMethod · 0.45
canConvertMethod · 0.45
createUint8ArrayFunction · 0.45

Calls 4

getJSIContextFunction · 0.85
getMethod · 0.65
assertFunction · 0.50
lockMethod · 0.45