summaryrefslogtreecommitdiff
path: root/dom/script/ScriptLoader.cpp
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-04-23 17:53:38 -0500
committerBrian Smith <brian@dbsoft.org>2023-04-27 13:35:21 -0500
commit1adf442e9249afed3d557ba0c679150e4d85c60e (patch)
tree0f4e4d6c54b865064228f42b3307ec30c962b5ab /dom/script/ScriptLoader.cpp
parent7b42bc809de8cd925f413f39d5248c765bd56c43 (diff)
downloaduxp-1adf442e9249afed3d557ba0c679150e4d85c60e.tar.gz
Issue #1691 - Part 12: Fix return value in ExecScript() and debug assert in ParseTask.
https://bugzilla.mozilla.org/show_bug.cgi?id=1331662 Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. ExecutionContext: The mRetValue is not used even though it is checked in various asserts. This is how it is in the Mozilla code even years later, only the passed in value is used. ParseTask: JoinDecode() and JoinCompile() run the same code but the type is different causing a debug assert when it checks the type Script vs ScriptDecode. (cherry picked from commit 8f577428b7834b7d0f0d5afacbe060fbb1ff2136)
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r--dom/script/ScriptLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 1136152096..e43803e7c8 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2349,7 +2349,7 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
{
nsJSUtils::ExecutionContext exec(cx, global);
if (aRequest->mOffThreadToken) {
- rv = exec.JoinDecode(&aRequest->mOffThreadToken);
+ rv = exec.JoinCompile(&aRequest->mOffThreadToken);
} else {
nsAutoString inlineData;
SourceBufferHolder srcBuf = GetScriptSource(aRequest, inlineData);