OLD | NEW |
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" | |
8 #include "bindings/core/v8/V8ArrayBuffer.h" | 7 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 8 #include "platform/bindings/DOMDataStore.h" |
9 #include "platform/wtf/CheckedNumeric.h" | 9 #include "platform/wtf/CheckedNumeric.h" |
10 #include "platform/wtf/typed_arrays/ArrayBufferView.h" | 10 #include "platform/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, | 18 static PassRefPtr<DataView> Create(ArrayBuffer* buffer, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return v8::Local<v8::Object>(); | 62 return v8::Local<v8::Object>(); |
63 DCHECK(v8_buffer->IsArrayBuffer()); | 63 DCHECK(v8_buffer->IsArrayBuffer()); |
64 | 64 |
65 v8::Local<v8::Object> wrapper = v8::DataView::New( | 65 v8::Local<v8::Object> wrapper = v8::DataView::New( |
66 v8_buffer.As<v8::ArrayBuffer>(), byteOffset(), byteLength()); | 66 v8_buffer.As<v8::ArrayBuffer>(), byteOffset(), byteLength()); |
67 | 67 |
68 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper); | 68 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper); |
69 } | 69 } |
70 | 70 |
71 } // namespace blink | 71 } // namespace blink |
OLD | NEW |