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

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

Issue 2677793003: Don't initialize event when calling create() with no argument (Closed)
Patch Set: Created 3 years, 10 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 6643b522c8654e18c93e0e3822dd875ca377a551..b20ac07afa56e29a5f143b6b438998b627a40ab5 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2971,6 +2971,7 @@ bool Document::dispatchBeforeUnloadEvent(ChromeClient& chromeClient,
return false;
BeforeUnloadEvent* beforeUnloadEvent = BeforeUnloadEvent::create();
+ beforeUnloadEvent->initEvent(EventTypeNames::beforeunload, false, true);
m_loadEventProgress = BeforeUnloadEventInProgress;
m_domWindow->dispatchEvent(beforeUnloadEvent, this);
m_loadEventProgress = BeforeUnloadEventCompleted;

Powered by Google App Engine
This is Rietveld 408576698