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

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

Issue 2059953003: service worker: Fix the type of a register promise reject value (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Error handling unification Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index efd57b705ecb0132efe521ca599154baee0085e0..f41b589dbef1c8901ba1ef45047589b83ce356a8 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -76,10 +76,12 @@ public:
{
if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
return;
+ ScriptState::Scope scope(m_resolver->getScriptState());
if (error.errorType == WebServiceWorkerError::ErrorTypeType) {
m_resolver->reject(V8ThrowException::createTypeError(m_resolver->getScriptState()->isolate(), error.message));
} else {
- m_resolver->reject(ServiceWorkerError::take(m_resolver.get(), error));
+ using ServiceWorkerErrorForRegister = ServiceWorkerErrorForUpdate;
+ m_resolver->reject(ServiceWorkerErrorForRegister::take(m_resolver.get(), error));
falken 2016/07/08 12:39:46 optional nit: mm.. I'd just save a line of code an
e_hakkinen 2016/07/08 12:48:51 Done.
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698