Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
index f9b3dd25899fe75806e37b5b7494db94ccf5e639..28e66474bd2ed3a45aa200217331a82e28ace882 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
@@ -126,10 +126,13 @@ void ServiceWorkerGlobalScope::close(ExceptionState& exceptionState) |
ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState) |
{ |
+ ExecutionContext* executionContext = scriptState->executionContext(); |
+ if (!executionContext) |
+ return ScriptPromise(); |
falken
2015/01/08 04:31:52
I have some questions.
1. What happens if Termina
xiang
2015/01/08 08:16:13
I'm not sure about it in this case, from my code r
falken
2015/01/08 08:28:05
I see! That looks right.
|
+ |
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
ScriptPromise promise = resolver->promise(); |
- ExecutionContext* executionContext = scriptState->executionContext(); |
ServiceWorkerGlobalScopeClient::from(executionContext)->skipWaiting(new SkipWaitingCallback(resolver)); |
return promise; |
} |