| 314 | } |
| 315 | |
| 316 | void 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 | |
| 332 | JavaScriptRuntime::~JavaScriptRuntime() { |
| 333 | VALDI_DEBUG(*_logger, "Destroying JavaScriptRuntime (instance ptr {})", static_cast<void*>(this)); |
no test coverage detected