MCPcopy Create free account
hub / github.com/Snapchat/Valdi / postInit

Method postInit

valdi/src/valdi/runtime/JavaScript/JavaScriptRuntime.cpp:316–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void JavaScriptRuntime::postInit() {
317 if (!_isWorker && _anrDetector != nullptr) {
318 _anrDetector->appendTaskScheduler(this);
319 }
320
321 _contextHandler = makeShared<JavaScriptComponentContextHandler>(*this, this, *_logger);
322 _initLock.leaveIfNotCompleted();
323
324 if (auto listener = getListener()) {
325 auto runtimeTweaks = listener->getRuntimeTweaks();
326 if (runtimeTweaks != nullptr) {
327 _dispatchQueue->setDisableSyncCallsInCallingThread(runtimeTweaks->disableSyncCallsInCallingThread());
328 }
329 }
330}
331
332JavaScriptRuntime::~JavaScriptRuntime() {
333 VALDI_DEBUG(*_logger, "Destroying JavaScriptRuntime (instance ptr {})", static_cast<void*>(this));

Callers 2

runtimeCreateWorkerMethod · 0.45
createWorkerMethod · 0.45

Tested by

no test coverage detected