| 531 | auto nonDeferredPool = Valdi::RefCountableAutoreleasePool::makeNonDeferred(); |
| 532 | |
| 533 | _globalContext->releaseDisposables(); |
| 534 | _contextManager->destroyContext(_globalContext); |
| 535 | |
| 536 | _modules.clear(); |
| 537 | _daemonClients.clear(); |
| 538 | _moduleLoader = JSValueRef(); |
| 539 | _symbolicateFunction = Result<JSValueRef>(); |
| 540 | _onDaemonClientEventFunction = Result<JSValueRef>(); |
| 541 | _uncaughtExceptionHandler = nullptr; |
| 542 | _unhandledRejectionHandler = nullptr; |
| 543 | if (_contextHandler != nullptr) { |
| 544 | _contextHandler->clear(); |
| 545 | _contextHandler = nullptr; |
| 546 | } |
| 547 | _runtimeDeserializers = nullptr; |
| 548 | _propertyNameIndex.setContext(nullptr); |
| 549 | |
| 550 | Weak<IJavaScriptContext> weakJavaScriptContext; |
| 551 | { |
| 552 | std::lock_guard<Mutex> lock(_mutex); |
| 553 | weakJavaScriptContext = weakRef(_javaScriptContext.get()); |
| 554 | _javaScriptContext = nullptr; |
| 555 | } |
| 556 | |
| 557 | SC_ASSERT(weakJavaScriptContext.expired()); |
| 558 | } |
| 559 | |
| 560 | void JavaScriptRuntime::setThreadQoS(ThreadQoSClass threadQoS) { |
| 561 | _dispatchQueue->setQoSClass(threadQoS); |
| 562 | } |
| 563 | |
| 564 | void JavaScriptRuntime::setListener(Valdi::IJavaScriptRuntimeListener* listener, |
| 565 | const Weak<SharedPtrRefCountable>& listenerOwner) { |
| 566 | std::lock_guard<Mutex> guard(_listenerMutex); |
| 567 | _listener = listener; |
| 568 | _listenerOwner = listenerOwner; |
nothing calls this directly
no test coverage detected