зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352290 - Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue; r=smaug
--HG-- extra : rebase_source : 235a56f1aad0abf2e9b4fb99b7867eb3cb30d395
This commit is contained in:
Родитель
4fda13fafa
Коммит
dc6a84b873
|
@ -1052,6 +1052,8 @@ CustomElementReactionsStack::Enqueue(Element* aElement,
|
|||
|
||||
// If the custom element reactions stack is empty, then:
|
||||
// Add element to the backup element queue.
|
||||
MOZ_ASSERT(!aReaction->IsUpgradeReaction(),
|
||||
"Upgrade reaction should not be scheduled to backup queue");
|
||||
mBackupQueue.AppendElement(aElement);
|
||||
elementData->mReactionQueue.AppendElement(aReaction);
|
||||
|
||||
|
|
|
@ -219,6 +219,16 @@ public:
|
|||
virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const
|
||||
{
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
bool IsUpgradeReaction()
|
||||
{
|
||||
return mIsUpgradeReaction;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool mIsUpgradeReaction = false;
|
||||
#endif
|
||||
};
|
||||
|
||||
class CustomElementUpgradeReaction final : public CustomElementReaction
|
||||
|
@ -227,6 +237,9 @@ public:
|
|||
explicit CustomElementUpgradeReaction(CustomElementDefinition* aDefinition)
|
||||
: mDefinition(aDefinition)
|
||||
{
|
||||
#if DEBUG
|
||||
mIsUpgradeReaction = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче