mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +09:00
Bug 1352290 - Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue;
Tag UXP Issue #1344
This commit is contained in:
parent
eb9d4bb8df
commit
c0e1a6e397
2 changed files with 15 additions and 0 deletions
|
|
@ -1045,6 +1045,8 @@ CustomElementReactionsStack::Enqueue(Element* aElement,
|
||||||
|
|
||||||
// If the custom element reactions stack is empty, then:
|
// If the custom element reactions stack is empty, then:
|
||||||
// Add element to the backup element queue.
|
// Add element to the backup element queue.
|
||||||
|
MOZ_ASSERT(!aReaction->IsUpgradeReaction(),
|
||||||
|
"Upgrade reaction should not be scheduled to backup queue");
|
||||||
mBackupQueue.AppendElement(aElement);
|
mBackupQueue.AppendElement(aElement);
|
||||||
elementData->mReactionQueue.AppendElement(aReaction);
|
elementData->mReactionQueue.AppendElement(aReaction);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,16 @@ public:
|
||||||
virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const
|
virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
bool IsUpgradeReaction()
|
||||||
|
{
|
||||||
|
return mIsUpgradeReaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool mIsUpgradeReaction = false;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class CustomElementUpgradeReaction final : public CustomElementReaction
|
class CustomElementUpgradeReaction final : public CustomElementReaction
|
||||||
|
|
@ -225,6 +235,9 @@ public:
|
||||||
explicit CustomElementUpgradeReaction(CustomElementDefinition* aDefinition)
|
explicit CustomElementUpgradeReaction(CustomElementDefinition* aDefinition)
|
||||||
: mDefinition(aDefinition)
|
: mDefinition(aDefinition)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
mIsUpgradeReaction = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue