| Index: Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
|
| index fca53dfd79bb8bcd49e3c88883c6e0786021bc9f..3d546eb37d002b50cbac943f6c477c181c806779 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
|
| @@ -36,8 +36,10 @@ ServiceWorkerContainerClient* ServiceWorkerContainerClient::from(ExecutionContex
|
| if (client)
|
| return client;
|
|
|
| - // If it's not provided yet create it lazily.
|
| - ASSERT(document->frame());
|
| + if (!document->frame())
|
| + return 0;
|
| +
|
| + // If it's not provided yet, create it lazily.
|
| document->page()->provideSupplement(ServiceWorkerContainerClient::supplementName(), ServiceWorkerContainerClient::create(document->frame()->loader().client()->createServiceWorkerProvider()));
|
| return static_cast<ServiceWorkerContainerClient*>(Supplement<Page>::from(document->page(), supplementName()));
|
| }
|
|
|