summaryrefslogtreecommitdiffstats
path: root/dom/base/nsJSUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsJSUtils.cpp')
-rw-r--r--dom/base/nsJSUtils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp
index 2e6e345a3..bc8253930 100644
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -298,10 +298,11 @@ nsJSUtils::CompileModule(JSContext* aCx,
NS_ENSURE_TRUE(xpc::Scriptability::Get(aEvaluationGlobal).Allowed(), NS_OK);
- if (!JS::CompileModule(aCx, aCompileOptions, aSrcBuf, aModule)) {
+ bool compileResult = JS::CompileModule(aCx, aCompileOptions, aSrcBuf, aModule);
+
+ if (!compileResult) {
return NS_ERROR_FAILURE;
}
-
return NS_OK;
}