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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.cpp

Issue 2617073002: Additional DCHECKs when accessing SharedArrayBuffer (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "core/dom/DOMSharedArrayBuffer.h" 5 #include "core/dom/DOMSharedArrayBuffer.h"
6 6
7 #include "bindings/core/v8/DOMDataStore.h" 7 #include "bindings/core/v8/DOMDataStore.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 v8::Local<v8::Object> DOMSharedArrayBuffer::wrap( 11 v8::Local<v8::Object> DOMSharedArrayBuffer::wrap(
12 v8::Isolate* isolate, 12 v8::Isolate* isolate,
13 v8::Local<v8::Object> creationContext) { 13 v8::Local<v8::Object> creationContext) {
14 DCHECK(!DOMDataStore::containsWrapper(this, isolate)); 14 DCHECK(!DOMDataStore::containsWrapper(this, isolate));
15 15
16 const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo(); 16 const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo();
17 v8::Local<v8::Object> wrapper = 17 v8::Local<v8::Object> wrapper =
18 v8::SharedArrayBuffer::New(isolate, data(), byteLength()); 18 v8::SharedArrayBuffer::New(isolate, buffer()->dataShared(), byteLength());
19 19
20 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper); 20 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper);
21 } 21 }
22 22
23 } // namespace blink 23 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698