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

Method lockAllJSContexts

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

Source from the content-addressed store, hash-verified

3657
3658Result<Value> JavaScriptRuntime::evaluateScript(const BytesView& script, const StringBox& sourceFilename) {
3659 Result<Value> result;
3660 dispatchSynchronouslyOnJsThread(JsThreadDispatchReason::EvaluateScript, [&](JavaScriptEntryParameters& jsEntry) {
3661 auto loadResult =
3662 loadJsModuleFromBytes(jsEntry.jsContext, script, sourceFilename, nullptr, 0, jsEntry.exceptionTracker);
3663
3664 if (!jsEntry.exceptionTracker) {
3665 result = jsEntry.exceptionTracker.extractError();
3666 return;
3667 }
3668
3669 auto convertedValue =
3670 jsValueToValue(jsEntry.jsContext, loadResult.first.get(), ReferenceInfoBuilder(), jsEntry.exceptionTracker);
3671

Callers 2

TEST_PFunction · 0.80
lockNextWorkerMethod · 0.80

Calls

no outgoing calls

Tested by 1

TEST_PFunction · 0.64