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

Method RequireCallback

test-app/runtime/src/main/cpp/ModuleInternal.cpp:166–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void ModuleInternal::RequireCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
167 try {
168 auto thiz = static_cast<ModuleInternal*>(args.Data().As<External>()->Value());
169 thiz->RequireCallbackImpl(args);
170 } catch (NativeScriptException& e) {
171 e.ReThrowToV8();
172 } catch (std::exception e) {
173 stringstream ss;
174 ss << "Error: c++ exception: " << e.what() << endl;
175 NativeScriptException nsEx(ss.str());
176 nsEx.ReThrowToV8();
177 } catch (...) {
178 NativeScriptException nsEx(std::string("Error: c++ exception!"));
179 nsEx.ReThrowToV8();
180 }
181}
182
183void ModuleInternal::RequireCallbackImpl(const v8::FunctionCallbackInfo<v8::Value>& args) {
184 auto isolate = args.GetIsolate();

Callers

nothing calls this directly

Calls 5

RequireCallbackImplMethod · 0.80
ReThrowToV8Method · 0.80
ValueMethod · 0.45
DataMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected