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..84180b60af90d8ed1b590388eec64e3d720d361f 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); |
+ // TODO(junov): 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; |
} |