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