From 4950c982e0465d82a726bd01859fb7fd40160d3b Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 11 Jul 2020 10:57:01 -0400 Subject: Issue #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. --- dom/base/nsJSUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dom') diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp index 5c7e20424..2e6e345a3 100644 --- a/dom/base/nsJSUtils.cpp +++ b/dom/base/nsJSUtils.cpp @@ -313,7 +313,8 @@ nsJSUtils::ModuleInstantiate(JSContext* aCx, JS::Handle 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); -- cgit v1.2.3