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

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

Issue 1875343002: Move WTF classes related to typed arrays to wtf/typed_arrays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 "core/dom/DOMDataView.h" 5 #include "core/dom/DOMDataView.h"
6 6
7 #include "bindings/core/v8/DOMDataStore.h" 7 #include "bindings/core/v8/DOMDataStore.h"
8 #include "bindings/core/v8/V8ArrayBuffer.h" 8 #include "bindings/core/v8/V8ArrayBuffer.h"
9 #include "platform/CheckedInt.h" 9 #include "platform/CheckedInt.h"
10 #include "wtf/ArrayBufferView.h" 10 #include "wtf/typed_arrays/ArrayBufferView.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 namespace { 14 namespace {
15 15
16 class DataView final : public ArrayBufferView { 16 class DataView final : public ArrayBufferView {
17 public: 17 public:
18 static PassRefPtr<DataView> create(ArrayBuffer* buffer, unsigned byteOffset, unsigned byteLength) 18 static PassRefPtr<DataView> create(ArrayBuffer* buffer, unsigned byteOffset, unsigned byteLength)
19 { 19 {
20 RELEASE_ASSERT(byteOffset <= buffer->byteLength()); 20 RELEASE_ASSERT(byteOffset <= buffer->byteLength());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (v8Buffer.IsEmpty()) 61 if (v8Buffer.IsEmpty())
62 return v8::Local<v8::Object>(); 62 return v8::Local<v8::Object>();
63 DCHECK(v8Buffer->IsArrayBuffer()); 63 DCHECK(v8Buffer->IsArrayBuffer());
64 64
65 v8::Local<v8::Object> wrapper = v8::DataView::New(v8Buffer.As<v8::ArrayBuffe r>(), byteOffset(), byteLength()); 65 v8::Local<v8::Object> wrapper = v8::DataView::New(v8Buffer.As<v8::ArrayBuffe r>(), byteOffset(), byteLength());
66 66
67 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper); 67 return associateWithWrapper(isolate, wrapperTypeInfo, wrapper);
68 } 68 }
69 69
70 } // namespace blink 70 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayPiece.h ('k') | third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698