| 3657 | |
| 3658 | Result<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 |
no outgoing calls