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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase past r181245 conflict 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/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index 56cfa426fcffa18585ebffeac1ccb26a5e44e904..bfdce4d55c8d585d90f6da74b414769fa05225f8 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "web/PageWidgetDelegate.h"
+#include "core/frame/FrameProtector.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/page/AutoscrollController.h"
@@ -60,10 +61,12 @@ static inline FrameView* rootFrameView(Page* page, LocalFrame* rootFrame)
void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime, LocalFrame* rootFrame)
{
- RefPtr<FrameView> view = rootFrameView(page, rootFrame);
+ FrameView* view = rootFrameView(page, rootFrame);
WTF_LOG(ScriptedAnimationController, "PageWidgetDelegate::animate: view = %d", !view ? 0 : 1);
if (!view)
return;
+
+ FrameViewProtector protect(view);
page->autoscrollController().animate(monotonicFrameBeginTime);
page->animator().serviceScriptedAnimations(monotonicFrameBeginTime);
}

Powered by Google App Engine
This is Rietveld 408576698