summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-04 08:51:51 +0200
committerGitHub <noreply@github.com>2020-08-04 08:51:51 +0200
commit501b29a5df925f2de3c0a1343290982e5ff6f829 (patch)
treef7359e9879c71d7da3e18638ee312e3ae204dfe3
parent8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83 (diff)
parentc5b47eb66c75642ded54474f3f559ff83c129c09 (diff)
downloadUXP-501b29a5df925f2de3c0a1343290982e5ff6f829.tar
UXP-501b29a5df925f2de3c0a1343290982e5ff6f829.tar.gz
UXP-501b29a5df925f2de3c0a1343290982e5ff6f829.tar.lz
UXP-501b29a5df925f2de3c0a1343290982e5ff6f829.tar.xz
UXP-501b29a5df925f2de3c0a1343290982e5ff6f829.zip
Merge pull request #1626 from g4jc/618
Fix debug build issues on es-modules-work branch
-rw-r--r--dom/base/nsJSUtils.cpp3
-rw-r--r--js/src/builtin/Module.js3
-rw-r--r--js/src/builtin/ModuleObject.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp
index 65965d74b..2601ffd87 100644
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -315,7 +315,8 @@ nsJSUtils::ModuleInstantiate(JSContext* aCx, JS::Handle<JSObject*> aModule)
MOZ_ASSERT(aCx == nsContentUtils::GetCurrentJSContext());
MOZ_ASSERT(NS_IsMainThread());
- MOZ_ASSERT(nsContentUtils::IsInMicroTask());
+ MOZ_ASSERT(CycleCollectedJSContext::Get() &&
+ CycleCollectedJSContext::Get()->MicroTaskLevel());
NS_ENSURE_TRUE(xpc::Scriptability::Get(aModule).Allowed(), NS_OK);
diff --git a/js/src/builtin/Module.js b/js/src/builtin/Module.js
index c9f20c18c..355303d44 100644
--- a/js/src/builtin/Module.js
+++ b/js/src/builtin/Module.js
@@ -67,7 +67,8 @@ function ModuleGetExportedNames(exportStarSet = [])
function ModuleSetStatus(module, newStatus)
{
- assert(newStatus >= MODULE_STATUS_ERRORED && newStatus <= MODULE_STATUS_EVALUATED,
+ assert(newStatus >= MODULE_STATUS_UNINSTANTIATED &&
+ newStatus <= MODULE_STATUS_EVALUATED_ERROR,
"Bad new module status in ModuleSetStatus");
// Note that under OOM conditions we can fail the module instantiation
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp
index 44e5a2c88..728929e8c 100644
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -272,7 +272,7 @@ IndirectBindingMap::put(JSContext* cx, HandleId name,
// different zone to the final module. Lazily allocate the map so we don't
// have to switch its zone when merging compartments.
if (!map_) {
- MOZ_ASSERT(!cx->zone()->group()->createdForHelperThread());
+ MOZ_ASSERT(!cx->zone()->usedByExclusiveThread);
map_.emplace(cx->zone());
if (!map_->init()) {
map_.reset();