| Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| index 8fdb935c43cc41dc37c59eedf778f1aa1546ec21..8ab12c488f0d034a8390fb9620f0a78c37195002 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| @@ -167,11 +167,11 @@ const AtomicString& ServiceWorkerGlobalScope::interfaceName() const
|
| return EventTargetNames::ServiceWorkerGlobalScope;
|
| }
|
|
|
| -bool ServiceWorkerGlobalScope::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
|
| +EventTarget::DispatchEventResult ServiceWorkerGlobalScope::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
|
| {
|
| m_eventNestingLevel++;
|
| - bool result = WorkerGlobalScope::dispatchEventInternal(event.get());
|
| - if (event->interfaceName() == EventNames::ErrorEvent && m_eventNestingLevel == 2)
|
| + EventTarget::DispatchEventResult result = WorkerGlobalScope::dispatchEventInternal(event.get());
|
| + if (event->interfaceName() == EventNames::ErrorEvent && m_eventNestingLevel == 2 && !event->defaultPrevented())
|
| m_hadErrorInTopLevelEventHandler = true;
|
| m_eventNestingLevel--;
|
| return result;
|
|
|