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

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp

Issue 2812833003: Revert of [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return; 220 return;
221 221
222 if (!handler_->SendRawData(static_cast<const char*>((data->Data())), 222 if (!handler_->SendRawData(static_cast<const char*>((data->Data())),
223 data_length)) { 223 data_length)) {
224 // FIXME: This should not throw an exception but instead forcefully close 224 // FIXME: This should not throw an exception but instead forcefully close
225 // the data channel. 225 // the data channel.
226 ThrowCouldNotSendDataException(exception_state); 226 ThrowCouldNotSendDataException(exception_state);
227 } 227 }
228 } 228 }
229 229
230 void RTCDataChannel::send(NotShared<DOMArrayBufferView> data, 230 void RTCDataChannel::send(DOMArrayBufferView* data,
231 ExceptionState& exception_state) { 231 ExceptionState& exception_state) {
232 if (!handler_->SendRawData( 232 if (!handler_->SendRawData(static_cast<const char*>(data->BaseAddress()),
233 static_cast<const char*>(data.View()->BaseAddress()), 233 data->byteLength())) {
234 data.View()->byteLength())) {
235 // FIXME: This should not throw an exception but instead forcefully close 234 // FIXME: This should not throw an exception but instead forcefully close
236 // the data channel. 235 // the data channel.
237 ThrowCouldNotSendDataException(exception_state); 236 ThrowCouldNotSendDataException(exception_state);
238 } 237 }
239 } 238 }
240 239
241 void RTCDataChannel::send(Blob* data, ExceptionState& exception_state) { 240 void RTCDataChannel::send(Blob* data, ExceptionState& exception_state) {
242 // FIXME: implement 241 // FIXME: implement
243 ThrowNoBlobSupportException(exception_state); 242 ThrowNoBlobSupportException(exception_state);
244 } 243 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 events.Clear(); 374 events.Clear();
376 } 375 }
377 376
378 DEFINE_TRACE(RTCDataChannel) { 377 DEFINE_TRACE(RTCDataChannel) {
379 visitor->Trace(scheduled_events_); 378 visitor->Trace(scheduled_events_);
380 EventTargetWithInlineData::Trace(visitor); 379 EventTargetWithInlineData::Trace(visitor);
381 SuspendableObject::Trace(visitor); 380 SuspendableObject::Trace(visitor);
382 } 381 }
383 382
384 } // namespace blink 383 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698