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

Unified Diff: third_party/WebKit/Source/core/events/EventDispatcher.cpp

Issue 1855203002: Revert of Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/events/EventDispatcher.cpp
diff --git a/third_party/WebKit/Source/core/events/EventDispatcher.cpp b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
index d2f5343c18aaecfc2b8c9272dbcf82f05aa8760a..5a51d615ecd92049c55572114884d12089032dcd 100644
--- a/third_party/WebKit/Source/core/events/EventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
@@ -73,15 +73,15 @@
// This persistent vector doesn't cause leaks, because added Nodes are removed
// before dispatchSimulatedClick() returns. This vector is here just to prevent
// the code from running into an infinite recursion of dispatchSimulatedClick().
- DEFINE_STATIC_LOCAL(HeapHashSet<Member<Node>>, nodesDispatchingSimulatedClicks, (new HeapHashSet<Member<Node>>));
+ DEFINE_STATIC_LOCAL(Persistent<HeapHashSet<Member<Node>>>, nodesDispatchingSimulatedClicks, (new HeapHashSet<Member<Node>>()));
if (isDisabledFormControl(&node))
return;
- if (nodesDispatchingSimulatedClicks.contains(&node))
+ if (nodesDispatchingSimulatedClicks->contains(&node))
return;
- nodesDispatchingSimulatedClicks.add(&node);
+ nodesDispatchingSimulatedClicks->add(&node);
if (mouseEventOptions == SendMouseOverUpDownEvents)
EventDispatcher(node, MouseEvent::create(EventTypeNames::mouseover, node.document().domWindow(), underlyingEvent, creationScope)).dispatch();
@@ -98,7 +98,7 @@
// always send click
EventDispatcher(node, MouseEvent::create(EventTypeNames::click, node.document().domWindow(), underlyingEvent, creationScope)).dispatch();
- nodesDispatchingSimulatedClicks.remove(&node);
+ nodesDispatchingSimulatedClicks->remove(&node);
}
DispatchEventResult EventDispatcher::dispatch()

Powered by Google App Engine
This is Rietveld 408576698