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

Unified Diff: Source/core/frame/EventHandlerRegistry.cpp

Issue 1280043002: Oilpan: turn EventHandlerRegistry::m_frameHost into a traced reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/frame/EventHandlerRegistry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/EventHandlerRegistry.cpp
diff --git a/Source/core/frame/EventHandlerRegistry.cpp b/Source/core/frame/EventHandlerRegistry.cpp
index f04362b3495eb2568fcb8ee9e652aaa06490bf9c..8c3098603fd1650e68f676ec24e1f0fdeb5d8720 100644
--- a/Source/core/frame/EventHandlerRegistry.cpp
+++ b/Source/core/frame/EventHandlerRegistry.cpp
@@ -41,7 +41,7 @@ inline bool isPointerEventType(const AtomicString& eventType)
} // namespace
EventHandlerRegistry::EventHandlerRegistry(FrameHost& frameHost)
- : m_frameHost(frameHost)
+ : m_frameHost(&frameHost)
{
}
@@ -196,7 +196,7 @@ void EventHandlerRegistry::didRemoveAllEventHandlers(EventTarget& target)
void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerClass, bool hasActiveHandlers)
{
- ScrollingCoordinator* scrollingCoordinator = m_frameHost.page().scrollingCoordinator();
+ ScrollingCoordinator* scrollingCoordinator = m_frameHost->page().scrollingCoordinator();
switch (handlerClass) {
case ScrollEvent:
@@ -208,7 +208,7 @@ void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerCla
scrollingCoordinator->updateHaveWheelEventHandlers();
break;
case TouchEvent:
- m_frameHost.chromeClient().needTouchEvents(hasActiveHandlers);
+ m_frameHost->chromeClient().needTouchEvents(hasActiveHandlers);
break;
#if ENABLE(ASSERT)
case EventsForTesting:
@@ -222,13 +222,14 @@ void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerCla
void EventHandlerRegistry::notifyDidAddOrRemoveEventHandlerTarget(EventHandlerClass handlerClass)
{
- ScrollingCoordinator* scrollingCoordinator = m_frameHost.page().scrollingCoordinator();
+ ScrollingCoordinator* scrollingCoordinator = m_frameHost->page().scrollingCoordinator();
if (scrollingCoordinator && handlerClass == TouchEvent)
scrollingCoordinator->touchEventTargetRectsDidChange();
}
DEFINE_TRACE(EventHandlerRegistry)
{
+ visitor->trace(m_frameHost);
visitor->template registerWeakMembers<EventHandlerRegistry, &EventHandlerRegistry::clearWeakMembers>(this);
}
@@ -289,13 +290,13 @@ void EventHandlerRegistry::checkConsistency() const
if (Node* node = eventTarget.key->toNode()) {
// See the comment for |documentDetached| if either of these assertions fails.
ASSERT(node->document().frameHost());
- ASSERT(node->document().frameHost() == &m_frameHost);
+ ASSERT(node->document().frameHost() == m_frameHost);
} else if (LocalDOMWindow* window = eventTarget.key->toDOMWindow()) {
// If any of these assertions fail, LocalDOMWindow failed to unregister its handlers
// properly.
ASSERT(window->frame());
ASSERT(window->frame()->host());
- ASSERT(window->frame()->host() == &m_frameHost);
+ ASSERT(window->frame()->host() == m_frameHost);
}
}
}
« no previous file with comments | « Source/core/frame/EventHandlerRegistry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698