Chromium Code Reviews| 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 0973ebc02c37956d9b0348d6c97bed8a8ae39ccc..2f3f365a79ba68a6bab5c28e3b7a5f83e3ac0238 100644 |
| --- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
| +++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
| @@ -376,7 +376,9 @@ void LocalDOMWindow::enqueueDocumentEvent(Event* event) { |
| } |
| void LocalDOMWindow::dispatchWindowLoadEvent() { |
| +#if DCHECK_IS_ON() |
| ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
|
mstensho (USE GERRIT)
2016/11/18 08:45:54
Just use DCHECK() instead?
Alexander Alekseev
2016/11/18 22:32:14
Done.
|
| +#endif |
| // Delay 'load' event if we are in EventQueueScope. This is a short-term |
| // workaround to avoid Editing code crashes. We should always dispatch |
| // 'load' event asynchronously. crbug.com/569511. |
| @@ -1419,7 +1421,9 @@ void LocalDOMWindow::dispatchLoadEvent() { |
| DispatchEventResult LocalDOMWindow::dispatchEvent(Event* event, |
| EventTarget* target) { |
| +#if DCHECK_IS_ON() |
| ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
| +#endif |
| event->setTrusted(true); |
| event->setTarget(target ? target : this); |