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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2938423002: Revert of Dispatch unload event for swapped-out subframes. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 93c58f5fdd111ae8a60a6ed921482cc86d0eb5a5..e1255bcb9e18bed22dca2c2eaa1ab4ba914e0f19 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1790,6 +1790,12 @@
proxy = RenderFrameProxy::CreateProxyToReplaceFrame(
this, proxy_routing_id, replicated_frame_state.scope);
+ // Synchronously run the unload handler before sending the ACK.
+ // TODO(creis): Call dispatchUnloadEvent unconditionally here to support
+ // unload on subframes as well.
+ if (is_main_frame_)
+ frame_->DispatchUnloadEvent();
+
// Swap out and stop sending any IPC messages that are not ACKs.
if (is_main_frame_)
render_view_->SetSwappedOut(true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698