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

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

Issue 337053004: Don't assert when ServiceWorker::from is passed an empty promise (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/ServiceWorker.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorker.cpp b/Source/modules/serviceworkers/ServiceWorker.cpp
index b1de87b41bdaa829ed13beb2cea9383ad9f28c18..1ec57d91826e4bc951b59582724f8068f950e0a3 100644
--- a/Source/modules/serviceworkers/ServiceWorker.cpp
+++ b/Source/modules/serviceworkers/ServiceWorker.cpp
@@ -157,7 +157,8 @@ PassRefPtr<ServiceWorker> ServiceWorker::from(ScriptPromiseResolverWithContext*
{
RefPtr<ServiceWorker> serviceWorker = ServiceWorker::from(resolver->scriptState()->executionContext(), worker);
ScriptState::Scope scope(resolver->scriptState());
- serviceWorker->waitOnPromise(resolver->promise());
+ if (!resolver->promise().isEmpty())
haraken 2014/06/17 00:51:55 Shall we move this check into ServiceWorker::waitO
falken 2014/06/17 01:07:51 Good idea, I've done this.
+ serviceWorker->waitOnPromise(resolver->promise());
return serviceWorker;
}
« Source/bindings/v8/ScriptPromise.cpp ('K') | « Source/bindings/v8/ScriptPromise.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698