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

Unified Diff: Source/web/RemoteFrameClientImpl.cpp

Issue 709363002: Revert of Revert of Fix RemoteFrame detachment to signal its client. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | public/web/WebRemoteFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/RemoteFrameClientImpl.cpp
diff --git a/Source/web/RemoteFrameClientImpl.cpp b/Source/web/RemoteFrameClientImpl.cpp
index dd1664f42dcb24740ae6c9d26338b77812a243af..dcd5e97711296794a39a7aa1ce1740e968340114 100644
--- a/Source/web/RemoteFrameClientImpl.cpp
+++ b/Source/web/RemoteFrameClientImpl.cpp
@@ -14,6 +14,7 @@
#include "platform/exported/WrappedResourceRequest.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "platform/weborigin/SecurityPolicy.h"
+#include "public/web/WebRemoteFrameClient.h"
#include "web/WebInputEventConversion.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebRemoteFrameImpl.h"
@@ -27,7 +28,17 @@
void RemoteFrameClientImpl::detached()
{
- // FIXME: Implement.
+ // Alert the client that the frame is being detached.
+ RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame);
+
+ WebRemoteFrameClient* client = m_webFrame->client();
+ if (!client)
+ return;
+
+ client->frameDetached();
+ // Clear our reference to RemoteFrame at the very end, in case the client
+ // refers to it.
+ m_webFrame->setCoreFrame(nullptr);
}
Frame* RemoteFrameClientImpl::opener() const
« no previous file with comments | « no previous file | public/web/WebRemoteFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698