| Index: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| index b0eac25048166a6f8fd985eb8faf036437307aca..34c9bc6888691ae9ca85abef4bee4a5d2f15fd06 100644
|
| --- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| +++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| @@ -151,8 +151,13 @@ void ServiceWorkerGlobalScopeProxy::dispatchPushEvent(int eventID, const WebStri
|
| {
|
| ASSERT(m_workerGlobalScope);
|
| WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::Push, eventID);
|
| - RefPtrWillBeRawPtr<Event> event(PushEvent::create(EventTypeNames::push, PushMessageData::create(data), observer));
|
| - m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
|
| + NonThrowableExceptionState exceptionState;
|
| + PushMessageData* messageData = PushMessageData::create(data, exceptionState);
|
| + // Fail silently by dropping the event when the allocation of PushMessageData fails (out of memory), which results in an exception
|
| + if (!exceptionState.hadException()) {
|
| + RefPtrWillBeRawPtr<Event> event(PushEvent::create(EventTypeNames::push, messageData, observer));
|
| + m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
|
| + }
|
| }
|
|
|
| void ServiceWorkerGlobalScopeProxy::dispatchServicePortConnectEvent(WebServicePortConnectEventCallbacks* rawCallbacks, const WebURL& targetURL, const WebString& origin, WebServicePortID portID)
|
|
|