Bug 1420178 - Add assertion to ensure the custom element reactions aren't scheduled to BackupQueue if they are from author code; r=smaug
☠☠ backed out by d24dd3821124 ☠ ☠
authorEdgar Chen <echen@mozilla.com>
Tue, 05 Dec 2017 17:56:57 +0800
changeset 450289 760107333833656db6c6b8706da966047e1874f2
parent 450288 1b13a12e07ac595f6d8dbea4c115ccc10f45475a
child 450290 9a6c837be3b44d1fa175b0f00bb405d56ee2960a
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1420178
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1420178 - Add assertion to ensure the custom element reactions aren't scheduled to BackupQueue if they are from author code; r=smaug MozReview-Commit-ID: BSna1j1NBSX
dom/base/CustomElementRegistry.cpp
--- 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;
   }