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

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: add some layout tests 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(NotShared<DOMArrayBufferView> arrayBufferView,
284 ExceptionState& exceptionState) { 284 ExceptionState& exceptionState) {
285 ASSERT(arrayBufferView); 285 DCHECK(arrayBufferView);
286 if (!canSendMessage(exceptionState)) 286 if (!canSendMessage(exceptionState))
287 return; 287 return;
288 288
289 m_messages.push_back(new Message(arrayBufferView->buffer())); 289 m_messages.push_back(new Message(arrayBufferView.view()->buffer()));
290 handleMessageQueue(); 290 handleMessageQueue();
291 } 291 }
292 292
293 void PresentationConnection::send(Blob* data, ExceptionState& exceptionState) { 293 void PresentationConnection::send(Blob* data, ExceptionState& exceptionState) {
294 ASSERT(data); 294 ASSERT(data);
295 if (!canSendMessage(exceptionState)) 295 if (!canSendMessage(exceptionState))
296 return; 296 return;
297 297
298 m_messages.push_back(new Message(data->blobDataHandle())); 298 m_messages.push_back(new Message(data->blobDataHandle()));
299 handleMessageQueue(); 299 handleMessageQueue();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void PresentationConnection::tearDown() { 516 void PresentationConnection::tearDown() {
517 // Cancel current Blob loading if any. 517 // Cancel current Blob loading if any.
518 if (m_blobLoader) { 518 if (m_blobLoader) {
519 m_blobLoader->cancel(); 519 m_blobLoader->cancel();
520 m_blobLoader.clear(); 520 m_blobLoader.clear();
521 } 521 }
522 m_messages.clear(); 522 m_messages.clear();
523 } 523 }
524 524
525 } // namespace blink 525 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698