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

--HG--
extra : rebase_source : 0a76832477429c146ade2c597a2e13f83835bc2a
This commit is contained in:
Edgar Chen 2017-12-05 17:56:57 +08:00
Родитель f80989079d
Коммит 4a910281dc
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -1061,6 +1061,8 @@ CustomElementReactionsStack::Enqueue(Element* aElement,
// Add element to the backup element queue. // Add element to the backup element queue.
MOZ_ASSERT(mReactionsStack.IsEmpty(), MOZ_ASSERT(mReactionsStack.IsEmpty(),
"custom element reactions stack should be empty"); "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(), MOZ_ASSERT(!aReaction->IsUpgradeReaction(),
"Upgrade reaction should not be scheduled to backup queue"); "Upgrade reaction should not be scheduled to backup queue");
mBackupQueue.AppendElement(aElement); mBackupQueue.AppendElement(aElement);