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

Unified Diff: Source/core/page/Page.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/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 7c6971aaecf294edacbc809ad06ec60b0df48502..b107c03954640e1f5971550d9c98b343eba80ae6 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -82,7 +82,7 @@ HashSet<Page*>& Page::ordinaryPages()
void Page::networkStateChanged(bool online)
{
- Vector<RefPtr<LocalFrame> > frames;
+ WillBeHeapVector<RefPtrWillBeMember<LocalFrame> > frames;
// Get all the frames of all the pages in all the page groups
HashSet<Page*>::iterator end = allPages().end();
@@ -264,7 +264,7 @@ void Page::refreshPlugins(bool reload)
PluginData::refresh();
- Vector<RefPtr<LocalFrame> > framesNeedingReload;
+ WillBeHeapVector<RefPtrWillBeMember<LocalFrame> > framesNeedingReload;
HashSet<Page*>::iterator end = allPages().end();
for (HashSet<Page*>::iterator it = allPages().begin(); it != end; ++it) {
@@ -566,7 +566,7 @@ void Page::didCommitLoad(LocalFrame* frame)
void Page::acceptLanguagesChanged()
{
- Vector< RefPtr<LocalFrame> > frames;
+ WillBeHeapVector<RefPtrWillBeMember<LocalFrame> > frames;
// Even though we don't fire an event from here, the LocalDOMWindow's will fire
// an event so we keep the frames alive until we are done.
@@ -594,6 +594,7 @@ void Page::trace(Visitor* visitor)
#if ENABLE(OILPAN)
visitor->trace(m_dragCaretController);
visitor->trace(m_dragController);
+ visitor->trace(m_focusController);
visitor->trace(m_contextMenuController);
visitor->trace(m_inspectorController);
visitor->trace(m_pointerLockController);
@@ -608,7 +609,7 @@ void Page::trace(Visitor* visitor)
void Page::willBeDestroyed()
{
- RefPtr<Frame> mainFrame = m_mainFrame;
+ RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame;
mainFrame->detach();
@@ -634,9 +635,13 @@ void Page::willBeDestroyed()
#endif
m_chrome->willBeDestroyed();
- m_mainFrame = 0;
if (m_validationMessageClient)
m_validationMessageClient->willBeDestroyed();
+#if ENABLE(OILPAN)
+ if (mainFrame)
+ mainFrame->willBeDestroyed();
+#endif
+ m_mainFrame = 0;
}
Page::PageClients::PageClients()

Powered by Google App Engine
This is Rietveld 408576698