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

Method LoadWorker

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

Source from the content-addressed store, hash-verified

233}
234
235void ModuleInternal::LoadWorker(Local<Context> context, const string& path) {
236 TNSPERF();
237 auto isolate = m_isolate;
238 TryCatch tc(isolate);
239
240 Load(context, path);
241
242 if (tc.HasCaught()) {
243 // This will handle any errors that occur when first loading a script (new worker)
244 // exceptions include: syntax errors, throw statements, access of properties of undefined objects
245 // Check if `onerror` handle is implemented
246 // Web behaviour - if onerror handle comes before exception throw - execute it, else - bubble up to main's worker object
247 CallbackHandlers::CallWorkerScopeOnErrorHandle(isolate, tc);
248 }
249}
250
251void ModuleInternal::CheckFileExists(Isolate* isolate, const std::string& path, const std::string& baseDir) {
252 JEnv env;

Callers 1

RunWorkerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected