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

Unified Diff: Source/core/frame/LocalDOMWindow.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/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 54eee0b21640a0177e665dc83cbf1aeaf6420452..028abf90ac49cf87c702742c444d86426a65bf91 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -62,6 +62,7 @@
#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameHost.h"
+#include "core/frame/FrameProtector.h"
#include "core/frame/FrameView.h"
#include "core/frame/History.h"
#include "core/frame/LocalFrame.h"
@@ -1073,7 +1074,7 @@ bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
// |m_frame| can be destructed during |Editor::findString()| via
// |Document::updateLayou()|, e.g. event handler removes a frame.
- RefPtr<LocalFrame> protectFrame(m_frame);
+ FrameProtector protectFrame(m_frame);
// FIXME (13016): Support wholeWord, searchInFrames and showDialog
return m_frame->editor().findString(string, !backwards, caseSensitive, wrap, false);
@@ -1396,7 +1397,8 @@ void LocalDOMWindow::scrollTo(int x, int y, ScrollBehavior scrollBehavior) const
document()->updateLayoutIgnorePendingStylesheets();
- RefPtr<FrameView> view = m_frame->view();
+ FrameView* view = m_frame->view();
+ FrameViewProtector protect(view);
if (!view)
return;

Powered by Google App Engine
This is Rietveld 408576698