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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2748603002: Add a lifecycle state machine for Page (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 0a37141dc1744a1af1fce1681fa600db04f7a21b..b3d6d6d9f407fbada38c478af83506049147e535 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -648,7 +648,10 @@ void Page::willCloseLayerTreeView(WebLayerTreeView& layerTreeView,
void Page::willBeDestroyed() {
Frame* mainFrame = m_mainFrame;
- mainFrame->detach(FrameDetachType::Remove);
+ // TODO(sashab): Remove this check, the call to detach() here should always
+ // work.
+ if (mainFrame->isAttached())
+ mainFrame->detach(FrameDetachType::Remove);
ASSERT(allPages().contains(this));
allPages().erase(this);
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698