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

Unified Diff: Source/modules/serviceworkers/NavigatorServiceWorker.cpp

Issue 27278002: Add an Error class for ServiceWorkers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: enum for error type, document ownership Created 7 years, 2 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: Source/modules/serviceworkers/NavigatorServiceWorker.cpp
diff --git a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
index af4596c05923e7d9bc0f5811ccf1d328b8947ef0..9ca89b5c8e6cc2c80a8565055b34cc8e15893fae 100644
--- a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
+++ b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
@@ -32,17 +32,19 @@
#include "RuntimeEnabledFeatures.h"
#include "V8ServiceWorker.h"
+#include "bindings/V8DOMError.h"
#include "bindings/v8/CallbackPromiseAdapter.h"
#include "bindings/v8/ScriptPromiseResolver.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ScriptExecutionContext.h"
+#include "core/dom/ExecutionContext.h"
#include "core/frame/Frame.h"
#include "core/frame/Navigator.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/workers/SharedWorker.h"
#include "modules/serviceworkers/ServiceWorker.h"
+#include "modules/serviceworkers/ServiceWorkerError.h"
#include "public/platform/WebServiceWorkerProvider.h"
#include "public/platform/WebServiceWorkerProviderClient.h"
#include "public/platform/WebString.h"
@@ -121,7 +123,7 @@ ScriptPromise NavigatorServiceWorker::registerServiceWorker(ExecutionContext* ex
}
RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(executionContext);
- ensureProvider()->registerServiceWorker(patternURL, scriptURL, new CallbackPromiseAdapter<ServiceWorker, ServiceWorker>(resolver, executionContext));
+ ensureProvider()->registerServiceWorker(patternURL, scriptURL, new CallbackPromiseAdapter<ServiceWorker, ServiceWorkerError>(resolver, executionContext));
return resolver->promise();
}
@@ -148,7 +150,7 @@ ScriptPromise NavigatorServiceWorker::unregisterServiceWorker(ExecutionContext*
}
RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(executionContext);
- ensureProvider()->unregisterServiceWorker(patternURL, new CallbackPromiseAdapter<ServiceWorker, ServiceWorker>(resolver, executionContext));
+ ensureProvider()->unregisterServiceWorker(patternURL, new CallbackPromiseAdapter<ServiceWorker, ServiceWorkerError>(resolver, executionContext));
return resolver->promise();
}

Powered by Google App Engine
This is Rietveld 408576698