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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2781383002: Followup comments from r460581. (Closed)
Patch Set: Created 3 years, 9 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 | « content/test/data/page_with_empty_beforeunload.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index cae0bb12134adec74ada3184674c5fb56990de92..72352ee3abe470d628d8b274c022d7eaeac3d209 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1425,6 +1425,10 @@ void LocalDOMWindow::addedEventListener(
addUnloadEventListener(this);
} else if (eventType == EventTypeNames::beforeunload) {
UseCounter::count(document(), UseCounter::DocumentBeforeUnloadRegistered);
+ // This is confusingly named. It doesn't actually add the listener. It
+ // just increments a count so that we know we have listeners registered
+ // for the purposes of determining if we can fast terminate the renderer
+ // process.
dcheng 2017/03/30 19:16:57 Nit: move this to line 1423 (since it applies equa
addBeforeUnloadEventListener(this);
if (frame() && !frame()->isMainFrame())
UseCounter::count(document(), UseCounter::SubFrameBeforeUnloadRegistered);
« no previous file with comments | « content/test/data/page_with_empty_beforeunload.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698