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/DOMArrayBuffer.h" | 5 #include "core/dom/DOMArrayBuffer.h" |
6 | 6 |
7 #include "bindings/core/v8/DOMDataStore.h" | 7 #include "platform/bindings/DOMDataStore.h" |
8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "platform/bindings/DOMWrapperWorld.h" |
9 #include "platform/wtf/RefPtr.h" | 9 #include "platform/wtf/RefPtr.h" |
10 #include "platform/wtf/Vector.h" | 10 #include "platform/wtf/Vector.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 static void AccumulateArrayBuffersForAllWorlds( | 14 static void AccumulateArrayBuffersForAllWorlds( |
15 v8::Isolate* isolate, | 15 v8::Isolate* isolate, |
16 DOMArrayBuffer* object, | 16 DOMArrayBuffer* object, |
17 Vector<v8::Local<v8::ArrayBuffer>, 4>& buffers) { | 17 Vector<v8::Local<v8::ArrayBuffer>, 4>& buffers) { |
18 Vector<RefPtr<DOMWrapperWorld>> worlds; | 18 Vector<RefPtr<DOMWrapperWorld>> worlds; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 DCHECK(!DOMDataStore::ContainsWrapper(this, isolate)); | 73 DCHECK(!DOMDataStore::ContainsWrapper(this, isolate)); |
74 | 74 |
75 const WrapperTypeInfo* wrapper_type_info = this->GetWrapperTypeInfo(); | 75 const WrapperTypeInfo* wrapper_type_info = this->GetWrapperTypeInfo(); |
76 v8::Local<v8::Object> wrapper = | 76 v8::Local<v8::Object> wrapper = |
77 v8::ArrayBuffer::New(isolate, Data(), ByteLength()); | 77 v8::ArrayBuffer::New(isolate, Data(), ByteLength()); |
78 | 78 |
79 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper); | 79 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |