| Index: Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| diff --git a/Source/modules/serviceworkers/WaitUntilObserver.cpp b/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| index f239f541f70185976a3e31dc9aab55232ea62e79..c5a4d4e1c14edc6df99dc01057de445bd133f8c1 100644
|
| --- a/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| +++ b/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| @@ -10,6 +10,7 @@
|
| #include "bindings/v8/ScriptValue.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "platform/NotImplemented.h"
|
| +#include "public/platform/WebServiceWorkerEventResult.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/RefPtr.h"
|
| @@ -84,6 +85,7 @@ WaitUntilObserver::WaitUntilObserver(ExecutionContext* context, int eventID)
|
| : ContextLifecycleObserver(context)
|
| , m_eventID(eventID)
|
| , m_pendingActivity(0)
|
| + , m_hasError(false)
|
| {
|
| }
|
|
|
| @@ -91,6 +93,8 @@ void WaitUntilObserver::reportError(const ScriptValue& value)
|
| {
|
| // FIXME: Propagate error message to the client for onerror handling.
|
| notImplemented();
|
| +
|
| + m_hasError = true;
|
| }
|
|
|
| void WaitUntilObserver::incrementPendingActivity()
|
| @@ -104,7 +108,8 @@ void WaitUntilObserver::decrementPendingActivity()
|
| if (--m_pendingActivity || !executionContext())
|
| return;
|
|
|
| - ServiceWorkerGlobalScopeClient::from(executionContext())->didHandleInstallEvent(m_eventID);
|
| + blink::WebServiceWorkerEventResult result = m_hasError ? blink::WebServiceWorkerEventResultRejected : blink::WebServiceWorkerEventResultCompleted;
|
| + ServiceWorkerGlobalScopeClient::from(executionContext())->didHandleInstallEvent(m_eventID, result);
|
| observeContext(0);
|
| }
|
|
|
|
|