Bug 1415761 - Catch the exception and rethrow it after invoking custom elements reactions;

The spec was unclear on how CEReactions interact with thrown exceptions; see https://github.com/whatwg/html/issues/3217. The spec is now being clarified in https://github.com/whatwg/html/pull/3235.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-20 20:14:59 -05:00 committed by Roy Tam
commit 5db13d0f4b
6 changed files with 50 additions and 8 deletions

View file

@ -450,7 +450,8 @@ nsHtml5TreeOperation::CreateHTMLElement(
nsAutoMicroTask mt;
}
dom::AutoCEReaction
autoCEReaction(document->GetDocGroup()->CustomElementReactionsStack());
autoCEReaction(document->GetDocGroup()->CustomElementReactionsStack(),
nullptr);
nsCOMPtr<dom::Element> newElement;
NS_NewHTMLElement(getter_AddRefs(newElement), nodeInfo.forget(),