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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2605383002: Introduce IncrementLoadEventDelayCount::clearAndCheckLoadEvent() (Closed)
Patch Set: Rebase Created 3 years, 11 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: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 150f6e080bfb8c13f4c10b664f5b87292c99ad25..c124c05ffd7586fb84790f0a298add48de1b4473 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5819,6 +5819,14 @@ void Document::decrementLoadEventDelayCount() {
checkLoadEventSoon();
}
+void Document::decrementLoadEventDelayCountAndCheckLoadEvent() {
+ DCHECK(m_loadEventDelayCount);
+ --m_loadEventDelayCount;
+
+ if (!m_loadEventDelayCount && frame())
+ frame()->loader().checkCompleted();
+}
+
void Document::checkLoadEventSoon() {
if (frame() && !m_loadEventDelayTimer.isActive())
m_loadEventDelayTimer.startOneShot(0, BLINK_FROM_HERE);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/IncrementLoadEventDelayCount.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698