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

Unified Diff: third_party/WebKit/Source/core/frame/RemoteFrame.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/RemoteFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
index e864435226d862991a9816cad4617f57d8fc1615..76ec00e19b0f2e772515fb36058635d87ea9e88c 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -81,7 +81,7 @@ void RemoteFrame::reload(FrameLoadType frameLoadType,
}
void RemoteFrame::detach(FrameDetachType type) {
- m_isDetaching = true;
+ m_lifecycle.advanceTo(FrameLifecycle::Detaching);
PluginScriptForbiddenScope forbidPluginDestructorScripting;
detachChildren();
@@ -104,6 +104,7 @@ void RemoteFrame::detach(FrameDetachType type) {
if (m_webLayer)
setWebLayer(nullptr);
Frame::detach(type);
+ m_lifecycle.advanceTo(FrameLifecycle::Detached);
}
bool RemoteFrame::prepareForCommit() {
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698