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

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

Issue 466723002: ServiceWorker: Enable ServiceWorkerRegistration and update layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@updatefound
Patch Set: rebase Created 6 years, 4 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/ServiceWorkerContainer.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index 68d72c74daa486c481badd2ce7ac8b56aebd76b5..f966de158b6a7b134acaf53c78bd0cc1b3b8990e 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -119,22 +119,14 @@ ScriptPromise ServiceWorkerContainer::registerServiceWorker(ScriptState* scriptS
return promise;
}
-#ifdef DISABLE_SERVICE_WORKER_REGISTRATION
- m_provider->registerServiceWorker(patternURL, scriptURL, new CallbackPromiseAdapter<ServiceWorker, ServiceWorkerError>(resolver));
-#else
m_provider->registerServiceWorker(patternURL, scriptURL, new CallbackPromiseAdapter<ServiceWorkerRegistration, ServiceWorkerError>(resolver));
-#endif
return promise;
}
class UndefinedValue {
public:
-#ifdef DISABLE_SERVICE_WORKER_REGISTRATION
- typedef WebServiceWorker WebType;
-#else
typedef WebServiceWorkerRegistration WebType;
-#endif
static V8UndefinedType take(ScriptPromiseResolver* resolver, WebType* registration)
{
ASSERT(!registration); // Anything passed here will be leaked.
« no previous file with comments | « LayoutTests/http/tests/serviceworker/waiting.html ('k') | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698