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

Method lockNextWorker

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

Source from the content-addressed store, hash-verified

3643
3644 return makeShared<JavaScriptErrorStackTrace>(jsContext, error.get(), exceptionTracker);
3645}
3646
3647void JavaScriptRuntime::performGcNow(IJavaScriptContext& jsContext) {
3648 VALDI_TRACE("Valdi.performGcNow");
3649 _hasGcScheduled = false;
3650 jsContext.garbageCollect();
3651 VALDI_DEBUG(*_logger, "Performed JS GC");
3652}
3653
3654JavaScriptContextMemoryStatistics JavaScriptRuntime::dumpMemoryStatistics(IJavaScriptContext& jsContext) {
3655 return jsContext.dumpMemoryStatistics();
3656}
3657
3658Result<Value> JavaScriptRuntime::evaluateScript(const BytesView& script, const StringBox& sourceFilename) {
3659 Result<Value> result;
3660 dispatchSynchronouslyOnJsThread(JsThreadDispatchReason::EvaluateScript, [&](JavaScriptEntryParameters& jsEntry) {

Callers

nothing calls this directly

Calls 6

onDoneFunction · 0.85
frontMethod · 0.80
lockAllJSContextsMethod · 0.80
emptyMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected