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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.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 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 void PresentationConnection::send(DOMArrayBuffer* arrayBuffer, 273 void PresentationConnection::send(DOMArrayBuffer* arrayBuffer,
274 ExceptionState& exceptionState) { 274 ExceptionState& exceptionState) {
275 ASSERT(arrayBuffer && arrayBuffer->buffer()); 275 ASSERT(arrayBuffer && arrayBuffer->buffer());
276 if (!canSendMessage(exceptionState)) 276 if (!canSendMessage(exceptionState))
277 return; 277 return;
278 278
279 m_messages.push_back(new Message(arrayBuffer)); 279 m_messages.push_back(new Message(arrayBuffer));
280 handleMessageQueue(); 280 handleMessageQueue();
281 } 281 }
282 282
283 void PresentationConnection::send(DOMArrayBufferView* arrayBufferView, 283 void PresentationConnection::send(
284 ExceptionState& exceptionState) { 284 const NotShared<DOMArrayBufferView>& arrayBufferView,
285 ASSERT(arrayBufferView); 285 ExceptionState& exceptionState) {
286 DCHECK(arrayBufferView.view());
286 if (!canSendMessage(exceptionState)) 287 if (!canSendMessage(exceptionState))
287 return; 288 return;
288 289
289 m_messages.push_back(new Message(arrayBufferView->buffer())); 290 m_messages.push_back(new Message(arrayBufferView.view()->buffer()));
290 handleMessageQueue(); 291 handleMessageQueue();
291 } 292 }
292 293
293 void PresentationConnection::send(Blob* data, ExceptionState& exceptionState) { 294 void PresentationConnection::send(Blob* data, ExceptionState& exceptionState) {
294 ASSERT(data); 295 ASSERT(data);
295 if (!canSendMessage(exceptionState)) 296 if (!canSendMessage(exceptionState))
296 return; 297 return;
297 298
298 m_messages.push_back(new Message(data->blobDataHandle())); 299 m_messages.push_back(new Message(data->blobDataHandle()));
299 handleMessageQueue(); 300 handleMessageQueue();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void PresentationConnection::tearDown() { 517 void PresentationConnection::tearDown() {
517 // Cancel current Blob loading if any. 518 // Cancel current Blob loading if any.
518 if (m_blobLoader) { 519 if (m_blobLoader) {
519 m_blobLoader->cancel(); 520 m_blobLoader->cancel();
520 m_blobLoader.clear(); 521 m_blobLoader.clear();
521 } 522 }
522 m_messages.clear(); 523 m_messages.clear();
523 } 524 }
524 525
525 } // namespace blink 526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698