summaryrefslogtreecommitdiffstats
path: root/dom/base/CustomElementRegistry.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-19 21:22:39 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:44 -0500
commita0014ac6e9e751f9f9bf68c1a345394bbcfd096f (patch)
tree6a7190495965549a03736feb6edc0b6a19e42da0 /dom/base/CustomElementRegistry.cpp
parentdd6749f7ddd4db014fb7d76a9b698d07f2b859f5 (diff)
downloadUXP-a0014ac6e9e751f9f9bf68c1a345394bbcfd096f.tar
UXP-a0014ac6e9e751f9f9bf68c1a345394bbcfd096f.tar.gz
UXP-a0014ac6e9e751f9f9bf68c1a345394bbcfd096f.tar.lz
UXP-a0014ac6e9e751f9f9bf68c1a345394bbcfd096f.tar.xz
UXP-a0014ac6e9e751f9f9bf68c1a345394bbcfd096f.zip
Bug 1378079 - Part 3: Complete the steps related to custom elements in "create an element for a token".
With fixup for missing header due to unified builds. Tag UXP Issue #1344
Diffstat (limited to 'dom/base/CustomElementRegistry.cpp')
-rw-r--r--dom/base/CustomElementRegistry.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
index 0f03b16bd..f17c2c7d9 100644
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -1044,8 +1044,12 @@ CustomElementReactionsStack::PopAndInvokeElementQueue()
// element, see https://github.com/w3c/webcomponents/issues/635.
// We usually report the error to entry global in gecko, so just follow the
// same behavior here.
+ // This may be null if it's called from parser, see the case of
+ // attributeChangedCallback in
+ // https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
+ // In that case, the exception of callback reactions will be automatically
+ // reported in CallSetup.
nsIGlobalObject* global = GetEntryGlobal();
- MOZ_ASSERT(global, "Should always have a entry global here!");
InvokeReactions(elementQueue, global);
}