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

Unified Diff: Source/modules/screen_orientation/ScreenOrientationController.cpp

Issue 335573004: Oilpan: Notify supplements of Page and LocalFrame destruction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and null check Created 6 years, 6 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/modules/screen_orientation/ScreenOrientationController.h ('k') | Source/platform/Supplementable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/screen_orientation/ScreenOrientationController.cpp
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.cpp b/Source/modules/screen_orientation/ScreenOrientationController.cpp
index aecdcc881df2c957d559d495c1248cc43d990b1d..a553065ef8cedba490184814bd55abcc45b60667 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.cpp
+++ b/Source/modules/screen_orientation/ScreenOrientationController.cpp
@@ -22,6 +22,12 @@ ScreenOrientationController::~ScreenOrientationController()
{
}
+void ScreenOrientationController::persistentHostHasBeenDestroyed()
+{
+ // Unregister lifecycle observation once page is being torn down.
+ observeContext(0);
+}
+
void ScreenOrientationController::provideTo(LocalFrame& frame, blink::WebScreenOrientationClient* client)
{
ScreenOrientationController* controller = new ScreenOrientationController(frame, client);
« no previous file with comments | « Source/modules/screen_orientation/ScreenOrientationController.h ('k') | Source/platform/Supplementable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698