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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/presentation/PresentationConnection.h" 5 #include "modules/presentation/PresentationConnection.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "core/dom/DOMArrayBuffer.h" 8 #include "core/dom/DOMArrayBuffer.h"
9 #include "core/dom/DOMArrayBufferView.h" 9 #include "core/dom/DOMArrayBufferView.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 void PresentationConnection::send(DOMArrayBuffer* array_buffer, 275 void PresentationConnection::send(DOMArrayBuffer* array_buffer,
276 ExceptionState& exception_state) { 276 ExceptionState& exception_state) {
277 ASSERT(array_buffer && array_buffer->Buffer()); 277 ASSERT(array_buffer && array_buffer->Buffer());
278 if (!CanSendMessage(exception_state)) 278 if (!CanSendMessage(exception_state))
279 return; 279 return;
280 280
281 messages_.push_back(new Message(array_buffer)); 281 messages_.push_back(new Message(array_buffer));
282 HandleMessageQueue(); 282 HandleMessageQueue();
283 } 283 }
284 284
285 void PresentationConnection::send( 285 void PresentationConnection::send(DOMArrayBufferView* array_buffer_view,
286 NotShared<DOMArrayBufferView> array_buffer_view, 286 ExceptionState& exception_state) {
287 ExceptionState& exception_state) { 287 ASSERT(array_buffer_view);
288 DCHECK(array_buffer_view);
289 if (!CanSendMessage(exception_state)) 288 if (!CanSendMessage(exception_state))
290 return; 289 return;
291 290
292 messages_.push_back(new Message(array_buffer_view.View()->buffer())); 291 messages_.push_back(new Message(array_buffer_view->buffer()));
293 HandleMessageQueue(); 292 HandleMessageQueue();
294 } 293 }
295 294
296 void PresentationConnection::send(Blob* data, ExceptionState& exception_state) { 295 void PresentationConnection::send(Blob* data, ExceptionState& exception_state) {
297 ASSERT(data); 296 ASSERT(data);
298 if (!CanSendMessage(exception_state)) 297 if (!CanSendMessage(exception_state))
299 return; 298 return;
300 299
301 messages_.push_back(new Message(data->GetBlobDataHandle())); 300 messages_.push_back(new Message(data->GetBlobDataHandle()));
302 HandleMessageQueue(); 301 HandleMessageQueue();
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 void PresentationConnection::TearDown() { 517 void PresentationConnection::TearDown() {
519 // Cancel current Blob loading if any. 518 // Cancel current Blob loading if any.
520 if (blob_loader_) { 519 if (blob_loader_) {
521 blob_loader_->Cancel(); 520 blob_loader_->Cancel();
522 blob_loader_.Clear(); 521 blob_loader_.Clear();
523 } 522 }
524 messages_.Clear(); 523 messages_.Clear();
525 } 524 }
526 525
527 } // namespace blink 526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698