Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
index afdf569ae6f3e22c4708c000811ad79591c1f34a..684634ff3e4071f47e45ec3f61901a6a5ccd8d35 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
@@ -227,10 +227,11 @@ void RTCDataChannel::send(DOMArrayBuffer* data,
}
}
-void RTCDataChannel::send(DOMArrayBufferView* data,
+void RTCDataChannel::send(const NotShared<DOMArrayBufferView>& data,
ExceptionState& exceptionState) {
- if (!m_handler->sendRawData(static_cast<const char*>(data->baseAddress()),
- data->byteLength())) {
+ if (!m_handler->sendRawData(
+ static_cast<const char*>(data.view()->baseAddress()),
+ data.view()->byteLength())) {
// FIXME: This should not throw an exception but instead forcefully close
// the data channel.
throwCouldNotSendDataException(exceptionState);

Powered by Google App Engine
This is Rietveld 408576698