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

Method runtimeOutputLog

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

Source from the content-addressed store, hash-verified

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
560void JavaScriptRuntime::setThreadQoS(ThreadQoSClass threadQoS) {
561 _dispatchQueue->setQoSClass(threadQoS);
562}
563
564void JavaScriptRuntime::setListener(Valdi::IJavaScriptRuntimeListener* listener,
565 const Weak<SharedPtrRefCountable>& listenerOwner) {
566 std::lock_guard<Mutex> guard(_listenerMutex);
567 _listener = listener;
568 _listenerOwner = listenerOwner;

Callers

nothing calls this directly

Calls 10

getParameterMethod · 0.80
newUndefinedMethod · 0.80
throwErrorMethod · 0.65
logMethod · 0.65
ErrorInterface · 0.50
valueToIntMethod · 0.45
getContextMethod · 0.45
isEnabledForTypeMethod · 0.45
valueToStaticStringMethod · 0.45
toStdStringMethod · 0.45

Tested by

no test coverage detected