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

Method init

test-app/runtime/src/main/cpp/JsV8InspectorClient.cpp:256–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void JsV8InspectorClient::init() {
257 if (inspector_ != nullptr) {
258 return;
259 }
260
261 v8::Locker locker(isolate_);
262 v8::Isolate::Scope isolate_scope(isolate_);
263 v8::HandleScope handle_scope(isolate_);
264 v8::Local<Context> context = Runtime::GetRuntime(isolate_)->GetContext();
265
266 inspector_ = V8Inspector::create(isolate_, this);
267
268 inspector_->contextCreated(v8_inspector::V8ContextInfo(context, JsV8InspectorClient::contextGroupId, {}));
269
270 context_.Reset(isolate_, context);
271
272 createInspectorSession();
273
274 tracing_agent_.reset(new tns::inspector::TracingAgentImpl());
275
276 try {
277 this->registerModules();
278 } catch (NativeScriptException& e) {
279 // we don't want to throw if registering modules failed.
280 // e.ReThrowToV8();
281 }
282}
283
284JsV8InspectorClient* JsV8InspectorClient::GetInstance() {
285 if (instance == nullptr) {

Callers

nothing calls this directly

Calls 5

registerModulesMethod · 0.95
GetContextMethod · 0.80
resetMethod · 0.65
V8ContextInfoFunction · 0.50
ResetMethod · 0.45

Tested by

no test coverage detected