| Index: Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| diff --git a/Source/modules/serviceworkers/WaitUntilObserver.cpp b/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| index f3ca24703a470407c78dfe966aa11ff0dfef0776..42f6cc7adcd2d4b1ba66d29d555e06a868dce4e1 100644
|
| --- a/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| +++ b/Source/modules/serviceworkers/WaitUntilObserver.cpp
|
| @@ -9,14 +9,22 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptValue.h"
|
| #include "bindings/core/v8/V8Binding.h"
|
| +#include "bindings/core/v8/V8ErrorEvent.h"
|
| #include "core/dom/ExecutionContext.h"
|
| +#include "core/events/ErrorEvent.h"
|
| #include "platform/NotImplemented.h"
|
| #include "public/platform/WebServiceWorkerEventResult.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/RefPtr.h"
|
| +#include "core/workers/WorkerGlobalScope.h"
|
| +#include "core/workers/WorkerThread.h"
|
| +#include "core/workers/WorkerReportingProxy.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| #include <v8.h>
|
|
|
| +#include "base/logging.h"
|
| +
|
| namespace blink {
|
|
|
| class WaitUntilObserver::ThenFunction FINAL : public ScriptFunction {
|
| @@ -95,8 +103,17 @@ WaitUntilObserver::WaitUntilObserver(ExecutionContext* context, EventType type,
|
|
|
| void WaitUntilObserver::reportError(const ScriptValue& value)
|
| {
|
| - // FIXME: Propagate error message to the client for onerror handling.
|
| - notImplemented();
|
| + VLOG(1) <<__FUNCTION__;
|
| + if(V8ErrorEvent::hasInstance(value.v8Value(), toIsolate(executionContext()))) {
|
| + ErrorEvent* errEvent = V8ErrorEvent::toImplWithTypeCheck(toIsolate(executionContext()), value.v8Value());
|
| + toWorkerGlobalScope(executionContext())->thread()->workerReportingProxy()
|
| + .reportException(errEvent->message(),
|
| + errEvent->lineno(),
|
| + errEvent->colno(),
|
| + errEvent->filename());
|
| + VLOG(1) << errEvent->message().ascii().data();
|
| + VLOG(1) << errEvent->filename().ascii().data()<< " : "<< errEvent->lineno() << " : " << errEvent->colno();
|
| + }
|
|
|
| m_hasError = true;
|
| }
|
|
|