Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h

Issue 2456773002: Clear the custom element's reaction queue if upgrade fails. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
index d053446f994b925321a770254131bd82d950aae3..8245eef949fa69965dedd0fb142e1e42eb5b1b48 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
@@ -29,10 +29,13 @@ class CORE_EXPORT CustomElementReactionStack final
void popInvokingReactions();
void enqueueToCurrentQueue(Element*, CustomElementReaction*);
void enqueueToBackupQueue(Element*, CustomElementReaction*);
+ void clearQueue(Element*);
static CustomElementReactionStack& current();
private:
+ friend class CustomElementReactionStackTestSupport;
+
using ElementReactionQueueMap =
HeapHashMap<Member<Element>, Member<CustomElementReactionQueue>>;
ElementReactionQueueMap m_map;
@@ -46,6 +49,15 @@ class CORE_EXPORT CustomElementReactionStack final
void enqueue(Member<ElementQueue>&, Element*, CustomElementReaction*);
};
+class CORE_EXPORT CustomElementReactionStackTestSupport final {
+ private:
+ friend class ResetCustomElementReactionStackForTest;
+
+ CustomElementReactionStackTestSupport() = delete;
+ static CustomElementReactionStack* setCurrentForTest(
+ CustomElementReactionStack*);
+};
+
} // namespace blink
#endif // CustomElementReactionStack_h

Powered by Google App Engine
This is Rietveld 408576698