summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-03 14:21:27 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-10 18:30:03 +0000
commitef8d18da70c2c2efedc5e4db1dca0ece30ac5d14 (patch)
tree48d9bbaeb28e7dbc76317b5c5324404aebb0dcc3 /dom
parent7bf3e4c46475a7aa936d702eb38d65d9126008f2 (diff)
downloadUXP-ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14.tar
UXP-ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14.tar.gz
UXP-ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14.tar.lz
UXP-ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14.tar.xz
UXP-ef8d18da70c2c2efedc5e4db1dca0ece30ac5d14.zip
Issue #618 - Match JSAPI names with the changes in 9ca74147225eed305e28c7887f9b2251aeeb0f36
Ref: BZ 1388728
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsJSUtils.cpp12
-rw-r--r--dom/base/nsJSUtils.h8
-rw-r--r--dom/script/ScriptLoader.cpp4
3 files changed, 12 insertions, 12 deletions
diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp
index c9cec96db..f26616f37 100644
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -306,9 +306,9 @@ nsJSUtils::CompileModule(JSContext* aCx,
}
nsresult
-nsJSUtils::ModuleDeclarationInstantiation(JSContext* aCx, JS::Handle<JSObject*> aModule)
+nsJSUtils::ModuleInstantiate(JSContext* aCx, JS::Handle<JSObject*> aModule)
{
- PROFILER_LABEL("nsJSUtils", "ModuleDeclarationInstantiation",
+ PROFILER_LABEL("nsJSUtils", "ModuleInstantiate",
js::ProfileEntry::Category::JS);
MOZ_ASSERT(aCx == nsContentUtils::GetCurrentJSContext());
@@ -316,7 +316,7 @@ nsJSUtils::ModuleDeclarationInstantiation(JSContext* aCx, JS::Handle<JSObject*>
NS_ENSURE_TRUE(xpc::Scriptability::Get(aModule).Allowed(), NS_OK);
- if (!JS::ModuleDeclarationInstantiation(aCx, aModule)) {
+ if (!JS::ModuleInstantiate(aCx, aModule)) {
return NS_ERROR_FAILURE;
}
@@ -324,9 +324,9 @@ nsJSUtils::ModuleDeclarationInstantiation(JSContext* aCx, JS::Handle<JSObject*>
}
nsresult
-nsJSUtils::ModuleEvaluation(JSContext* aCx, JS::Handle<JSObject*> aModule)
+nsJSUtils::ModuleEvaluate(JSContext* aCx, JS::Handle<JSObject*> aModule)
{
- PROFILER_LABEL("nsJSUtils", "ModuleEvaluation",
+ PROFILER_LABEL("nsJSUtils", "ModuleEvaluate",
js::ProfileEntry::Category::JS);
MOZ_ASSERT(aCx == nsContentUtils::GetCurrentJSContext());
@@ -335,7 +335,7 @@ nsJSUtils::ModuleEvaluation(JSContext* aCx, JS::Handle<JSObject*> aModule)
NS_ENSURE_TRUE(xpc::Scriptability::Get(aModule).Allowed(), NS_OK);
- if (!JS::ModuleEvaluation(aCx, aModule)) {
+ if (!JS::ModuleEvaluate(aCx, aModule)) {
return NS_ERROR_FAILURE;
}
diff --git a/dom/base/nsJSUtils.h b/dom/base/nsJSUtils.h
index 4affab2d3..9eea6ae83 100644
--- a/dom/base/nsJSUtils.h
+++ b/dom/base/nsJSUtils.h
@@ -116,11 +116,11 @@ public:
JS::CompileOptions &aCompileOptions,
JS::MutableHandle<JSObject*> aModule);
- static nsresult ModuleDeclarationInstantiation(JSContext* aCx,
- JS::Handle<JSObject*> aModule);
+ static nsresult ModuleInstantiate(JSContext* aCx,
+ JS::Handle<JSObject*> aModule);
- static nsresult ModuleEvaluation(JSContext* aCx,
- JS::Handle<JSObject*> aModule);
+ static nsresult ModuleEvaluate(JSContext* aCx,
+ JS::Handle<JSObject*> aModule);
// Returns false if an exception got thrown on aCx. Passing a null
// aElement is allowed; that wil produce an empty aScopeChain.
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 7aca04da5..736bb4349 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -888,7 +888,7 @@ ScriptLoader::InstantiateModuleTree(ModuleLoadRequest* aRequest)
NS_ENSURE_SUCCESS(rv, false);
JS::Rooted<JSObject*> module(jsapi.cx(), ms->ModuleRecord());
- bool ok = NS_SUCCEEDED(nsJSUtils::ModuleDeclarationInstantiation(jsapi.cx(), module));
+ bool ok = NS_SUCCEEDED(nsJSUtils::ModuleInstantiate(jsapi.cx(), module));
JS::RootedValue exception(jsapi.cx());
if (!ok) {
@@ -1953,7 +1953,7 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
} else {
JS::Rooted<JSObject*> module(aes.cx(), ms->ModuleRecord());
MOZ_ASSERT(module);
- rv = nsJSUtils::ModuleEvaluation(aes.cx(), module);
+ rv = nsJSUtils::ModuleEvaluate(aes.cx(), module);
}
} else {
JS::CompileOptions options(aes.cx());