| Index: third_party/WebKit/Source/web/WebSocketImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebSocketImpl.cpp b/third_party/WebKit/Source/web/WebSocketImpl.cpp
|
| index 9f453f13a1310e4b483d5e26c27698bcec77ed41..f797b6de86c3b0b77889f5a3a2889319c2b2f11d 100644
|
| --- a/third_party/WebKit/Source/web/WebSocketImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebSocketImpl.cpp
|
| @@ -172,7 +172,13 @@ void WebSocketImpl::didReceiveBinaryMessage(PassOwnPtr<Vector<char>> payload)
|
| // FIXME: Handle Blob after supporting WebBlob.
|
| break;
|
| case BinaryTypeArrayBuffer:
|
| - m_client->didReceiveArrayBuffer(WebArrayBuffer(DOMArrayBuffer::create(payload->data(), payload->size())));
|
| + // TODO(junov): crbug.com/536816
|
| + // Avoid crashing when out of memory by calling createOrNull. Requires
|
| + // determining appropriate alternate behavior for dealing with allocation
|
| + // failures. Should the notification be droped? Should we just pass null
|
| + // data? Should we signal an error somehow?
|
| + RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::deprecatedCreateOrCrash(payload->data(), payload->size());
|
| + m_client->didReceiveArrayBuffer(WebArrayBuffer(buffer.release()));
|
| break;
|
| }
|
| }
|
|
|