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

Side by Side Diff: Source/core/page/Page.cpp

Issue 1041473002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/PrintContextTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 visitor->trace(m_frameHost); 550 visitor->trace(m_frameHost);
551 HeapSupplementable<Page>::trace(visitor); 551 HeapSupplementable<Page>::trace(visitor);
552 #endif 552 #endif
553 PageLifecycleNotifier::trace(visitor); 553 PageLifecycleNotifier::trace(visitor);
554 } 554 }
555 555
556 void Page::willBeDestroyed() 556 void Page::willBeDestroyed()
557 { 557 {
558 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; 558 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame;
559 559
560 mainFrame->detach(); 560 mainFrame->detach(FrameDetachType::Remove);
561 561
562 if (mainFrame->isLocalFrame()) { 562 if (mainFrame->isLocalFrame()) {
563 toLocalFrame(mainFrame.get())->setView(nullptr); 563 toLocalFrame(mainFrame.get())->setView(nullptr);
564 } else { 564 } else {
565 ASSERT(m_mainFrame->isRemoteFrame()); 565 ASSERT(m_mainFrame->isRemoteFrame());
566 toRemoteFrame(mainFrame.get())->setView(nullptr); 566 toRemoteFrame(mainFrame.get())->setView(nullptr);
567 } 567 }
568 568
569 allPages().remove(this); 569 allPages().remove(this);
570 if (ordinaryPages().contains(this)) 570 if (ordinaryPages().contains(this))
(...skipping 23 matching lines...) Expand all
594 { 594 {
595 } 595 }
596 596
597 Page::PageClients::~PageClients() 597 Page::PageClients::~PageClients()
598 { 598 {
599 } 599 }
600 600
601 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; 601 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>;
602 602
603 } // namespace blink 603 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/PrintContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698