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

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

Issue 655063003: Disconnect frame owners when detaching frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on top of frame detach streamlining and add a test Created 6 years, 2 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 | « no previous file | Source/core/html/HTMLFrameOwnerElement.cpp » ('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 d45db355c975bbb0c7041fed3c7f2504b8a9c281..e27a9901c1a8995ae0c45e6099426458d4871566 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -80,11 +80,9 @@ Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
Frame::~Frame()
{
-#if ENABLE(OILPAN)
ASSERT(!m_owner);
-#else
+#if !ENABLE(OILPAN)
// FIXME: We should not be doing all this work inside the destructor
- disconnectOwnerElement();
setDOMWindow(nullptr);
#endif
@@ -109,6 +107,7 @@ void Frame::detach()
// http://crbug.com/371084 is a probable explanation.
if (!client())
return;
+ 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();
« no previous file with comments | « no previous file | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698