From 1aa6cdcc1d06dbf5a59ff8f741c0d6185c3517c1 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 5 Jan 2020 18:48:51 -0500 Subject: Bug 1352290 - Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue; Tag UXP Issue #1344 --- dom/base/CustomElementRegistry.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dom/base/CustomElementRegistry.h') diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h index 674c653ab7..867c92647b 100644 --- a/dom/base/CustomElementRegistry.h +++ b/dom/base/CustomElementRegistry.h @@ -217,6 +217,16 @@ public: virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const { } + +#if DEBUG + bool IsUpgradeReaction() + { + return mIsUpgradeReaction; + } + +protected: + bool mIsUpgradeReaction = false; +#endif }; class CustomElementUpgradeReaction final : public CustomElementReaction @@ -225,6 +235,9 @@ public: explicit CustomElementUpgradeReaction(CustomElementDefinition* aDefinition) : mDefinition(aDefinition) { +#if DEBUG + mIsUpgradeReaction = true; +#endif } private: -- cgit v1.2.3