summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-07-11 10:57:01 -0400
committerGaming4JC <g4jc@hyperbola.info>2020-07-11 10:57:29 -0400
commitdac9c24bc1ff788cddc866b6e895014070335b2e (patch)
treee4ee854c5cd658ac839921f0027d324f37fad14c
parentfa55f9aa8db633848d39f09247b12c4f41ff5c83 (diff)
downloadaura-central-dac9c24bc1ff788cddc866b6e895014070335b2e.tar.gz
Issue mcp-graveyard/UXP%618 - Remove eager instantiation - Debug follow up
The added debug assertion did not take into account microtask refactoring done in BZ 1405821. Resulting in error: no member named 'IsInMicroTask' in 'nsContentUtils'. This resolves the error.
-rw-r--r--dom/base/nsJSUtils.cpp3
1 files changed, 2 insertions, 1 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);