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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.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
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 69f80ab7c2ef6d7e66105fbb74ab8a5738b6d774..e5ae23ed63d42b0ce5087d9516e60933f3c0b65e 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -392,8 +392,8 @@ void LocalFrame::reload(FrameLoadType loadType,
void LocalFrame::detach(FrameDetachType type) {
// Note that detach() can be re-entered, so it's not possible to
- // DCHECK(!m_isDetaching) here.
- m_isDetaching = true;
+ // DCHECK(isAttached()) here.
+ m_lifecycle.advanceTo(FrameLifecycle::Detaching);
if (isLocalRoot())
m_performanceMonitor->shutdown();
@@ -452,6 +452,7 @@ void LocalFrame::detach(FrameDetachType type) {
m_supplements.clear();
m_frameScheduler.reset();
WeakIdentifierMap<LocalFrame>::notifyObjectDestroyed(this);
+ m_lifecycle.advanceTo(FrameLifecycle::Detached);
}
bool LocalFrame::prepareForCommit() {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameLifecycle.cpp ('k') | third_party/WebKit/Source/core/frame/RemoteFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698