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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1968933002: Fix: tabs slow to response to beforeunload are closed prematurely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revisited solution Created 4 years, 7 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: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 45d8ca0cffc75a6862df86dcbaef4b24a71fe007..6af00baee7acfe33d3374f4aa4fe85e8e657bd4d 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -401,6 +401,10 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost,
// PlzNavigate: this call happens on all browser-initiated navigations.
void DispatchBeforeUnload(bool for_navigation);
+ // Next |DispatchBeforeUnload| will be treated as a new event even if
+ // frame hasn't responded with |OnBeforeUnloadACK| yet.
+ void DontWaitForBeforeUnloadAck();
+
// Returns true if a call to DispatchBeforeUnload will actually send the
// BeforeUnload IPC. This is the case if the current renderer is live and this
// frame is the main frame.

Powered by Google App Engine
This is Rietveld 408576698