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

Unified Diff: Source/core/frame/Frame.cpp

Issue 1177333002: Revert of 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/core/frame/FrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index 58e7d90971df8449c3d2bdc69ce2da5e12fe01c1..cecf59b4ab651f6f59069669b4a81d21a58881a4 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -80,14 +80,14 @@
visitor->trace(m_owner);
}
-void Frame::detach(FrameDetachType type)
+void Frame::detach()
{
ASSERT(m_client);
domWindow()->resetLocation();
disconnectOwnerElement();
// After this, we must no longer talk to the client since this clears
// its owning reference back to our owning LocalFrame.
- m_client->detached(type);
+ m_client->detached();
m_client = nullptr;
m_host = nullptr;
}
@@ -100,7 +100,7 @@
for (Frame* child = tree().firstChild(); child; child = child->tree().nextSibling())
childrenToDetach.append(child);
for (const auto& child : childrenToDetach)
- child->detach(FrameDetachType::Remove);
+ child->detach();
}
void Frame::disconnectOwnerElement()
@@ -158,15 +158,14 @@
return emptyChromeClient();
}
-void Frame::prepareSwapFrom(Frame* old)
+void Frame::finishSwapFrom(Frame* old)
{
WindowProxyManager* oldManager = old->windowProxyManager();
+ // FIXME: In the future, the Blink API layer will be calling detach() on the
+ // old frame prior to completing the swap. However, detach calls
+ // clearForClose() instead of clearForNavigation(). Make sure this doesn't
+ // become a no-op when that lands, since it's important to detach the global.
oldManager->clearForNavigation();
-}
-
-void Frame::finishSwapFrom(Frame* old)
-{
- WindowProxyManager* oldManager = old->windowProxyManager();
windowProxyManager()->takeGlobalFrom(oldManager);
}
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/core/frame/FrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698