| Index: third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| index a6ad926e4159ae9ef77a82f0e5edf730b2ad8190..b6aeaa628802226554cf9adfed93234c0e75020d 100644
|
| --- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| @@ -287,7 +287,12 @@ void RTCDataChannel::didReceiveRawData(const char* data, size_t dataLength)
|
| return;
|
| }
|
| if (m_binaryType == BinaryTypeArrayBuffer) {
|
| - RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::create(data, dataLength);
|
| + // FIXME(crbug.com/536816):
|
| + // Consider using createOrNull instead of deprecatedCreateOrCrash.
|
| + // It must be ascertained whether dropping the event or producing some
|
| + // kind of failure code would be an acceptable alternative to crashing
|
| + // the process when array buffer allocation fails.
|
| + RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::deprecatedCreateOrCrash(data, dataLength);
|
| scheduleDispatchEvent(MessageEvent::create(buffer.release()));
|
| return;
|
| }
|
|
|