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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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: Source/modules/screen_orientation/ScreenOrientationController.cpp
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.cpp b/Source/modules/screen_orientation/ScreenOrientationController.cpp
index f44a055af7c27994a9689d67500c0f0595cebf20..8b8cd702b719d41508bbd06e4ff9a18b810241f0 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.cpp
+++ b/Source/modules/screen_orientation/ScreenOrientationController.cpp
@@ -21,12 +21,6 @@ ScreenOrientationController::~ScreenOrientationController()
{
}
-void ScreenOrientationController::persistentHostHasBeenDestroyed()
-{
- // Unregister lifecycle observation once page is being torn down.
- observeContext(0);
-}
-
void ScreenOrientationController::provideTo(LocalFrame& frame, WebScreenOrientationClient* client)
{
ASSERT(RuntimeEnabledFeatures::screenOrientationEnabled());
@@ -127,7 +121,7 @@ void ScreenOrientationController::notifyOrientationChanged()
// Keep track of the frames that need to be notified before notifying the
// current frame as it will prevent side effects from the change event
// handlers.
- Vector<RefPtr<LocalFrame> > childFrames;
+ WillBeHeapVector<RefPtrWillBeMember<LocalFrame> > childFrames;
for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) {
if (child->isLocalFrame())
childFrames.append(toLocalFrame(child));
@@ -139,8 +133,7 @@ void ScreenOrientationController::notifyOrientationChanged()
// ... and child frames, if they have a ScreenOrientationController.
for (size_t i = 0; i < childFrames.size(); ++i) {
- ScreenOrientationController* controller = ScreenOrientationController::from(*childFrames[i]);
- if (controller)
+ if (ScreenOrientationController* controller = ScreenOrientationController::from(*childFrames[i]))
controller->notifyOrientationChanged();
}
}

Powered by Google App Engine
This is Rietveld 408576698