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

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

Issue 38143002: Have LifecycleContext::lifecycleNotifier() return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/page/Page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 3ccd6653b501231b812df9d1332607952fff2cd1..da66098645de329af5a9fc9444a9f5384948159e 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -1443,7 +1443,7 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<Event
didAddStorageEventListener(this);
}
- lifecycleNotifier()->notifyAddEventListener(this, eventType);
+ lifecycleNotifier().notifyAddEventListener(this, eventType);
if (eventType == EventTypeNames::unload) {
addUnloadEventListener(this);
@@ -1475,7 +1475,7 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
document->didRemoveTouchEventHandler(document);
}
- lifecycleNotifier()->notifyRemoveEventListener(this, eventType);
+ lifecycleNotifier().notifyRemoveEventListener(this, eventType);
if (eventType == EventTypeNames::unload) {
removeUnloadEventListener(this);
@@ -1535,7 +1535,7 @@ void DOMWindow::removeAllEventListeners()
{
EventTarget::removeAllEventListeners();
- lifecycleNotifier()->notifyRemoveAllEventListeners(this);
+ lifecycleNotifier().notifyRemoveAllEventListeners(this);
if (NewDeviceOrientationController* controller = NewDeviceOrientationController::from(document()))
controller->stopUpdating();
@@ -1772,9 +1772,9 @@ DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index)
return 0;
}
-DOMWindowLifecycleNotifier* DOMWindow::lifecycleNotifier()
+DOMWindowLifecycleNotifier& DOMWindow::lifecycleNotifier()
{
- return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleNotifier());
+ return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext::lifecycleNotifier());
}
PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698