Bug 1420178 - Add assertion to ensure the custom element reactions aren't scheduled to BackupQueue if they are from author code;
MozReview-Commit-ID: BSna1j1NBSX
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -1056,16 +1056,18 @@ CustomElementReactionsStack::Enqueue(Ele
elementData->mReactionQueue.AppendElement(aReaction);
return;
}
// If the custom element reactions stack is empty, then:
// Add element to the backup element queue.
MOZ_ASSERT(mReactionsStack.IsEmpty(),
"custom element reactions stack should be empty");
+ MOZ_ASSERT(!GetIncumbentGlobal(),
+ "Custom element reaction should not be scheduled to backup queue if it is from author code");
MOZ_ASSERT(!aReaction->IsUpgradeReaction(),
"Upgrade reaction should not be scheduled to backup queue");
mBackupQueue.AppendElement(aElement);
elementData->mReactionQueue.AppendElement(aReaction);
if (mIsBackupQueueProcessing) {
return;
}