| Index: Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| index 612d37b84959a9cb12573e8e280c148853c39798..4c7d6684f6bd67128e83460171c0d329f8915563 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| @@ -134,6 +134,10 @@ ScriptPromise ServiceWorkerContainer::registerServiceWorker(ScriptState* scriptS
|
| }
|
|
|
| ExecutionContext* executionContext = scriptState->executionContext();
|
| + // FIXME: May be null due to worker termination: http://crbug.com/413518.
|
| + if (!executionContext)
|
| + return ScriptPromise();
|
| +
|
| RefPtr<SecurityOrigin> documentOrigin = executionContext->securityOrigin();
|
| String errorMessage;
|
| if (!executionContext->isPrivilegedContext(errorMessage)) {
|
| @@ -193,6 +197,10 @@ ScriptPromise ServiceWorkerContainer::getRegistration(ScriptState* scriptState,
|
| }
|
|
|
| ExecutionContext* executionContext = scriptState->executionContext();
|
| + // FIXME: May be null due to worker termination: http://crbug.com/413518.
|
| + if (!executionContext)
|
| + return ScriptPromise();
|
| +
|
| RefPtr<SecurityOrigin> documentOrigin = executionContext->securityOrigin();
|
| String errorMessage;
|
| if (!executionContext->isPrivilegedContext(errorMessage)) {
|
|
|