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

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

Issue 2812013004: Rewrite references to "wtf/" to "platform/wtf/" in core/{dom,html,xml}. (Closed)
Patch Set: 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 "core/dom/DOMArrayBuffer.h" 5 #include "core/dom/DOMArrayBuffer.h"
6 6
7 #include "bindings/core/v8/DOMDataStore.h" 7 #include "bindings/core/v8/DOMDataStore.h"
8 #include "wtf/RefPtr.h" 8 #include "platform/wtf/RefPtr.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 DOMArrayBuffer* DOMArrayBuffer::CreateUninitializedOrNull( 12 DOMArrayBuffer* DOMArrayBuffer::CreateUninitializedOrNull(
13 unsigned num_elements, 13 unsigned num_elements,
14 unsigned element_byte_size) { 14 unsigned element_byte_size) {
15 RefPtr<ArrayBuffer> buffer = WTF::ArrayBuffer::CreateUninitializedOrNull( 15 RefPtr<ArrayBuffer> buffer = WTF::ArrayBuffer::CreateUninitializedOrNull(
16 num_elements, element_byte_size); 16 num_elements, element_byte_size);
17 if (!buffer) 17 if (!buffer)
18 return nullptr; 18 return nullptr;
19 return Create(std::move(buffer)); 19 return Create(std::move(buffer));
20 } 20 }
21 21
22 v8::Local<v8::Object> DOMArrayBuffer::Wrap( 22 v8::Local<v8::Object> DOMArrayBuffer::Wrap(
23 v8::Isolate* isolate, 23 v8::Isolate* isolate,
24 v8::Local<v8::Object> creation_context) { 24 v8::Local<v8::Object> creation_context) {
25 DCHECK(!DOMDataStore::ContainsWrapper(this, isolate)); 25 DCHECK(!DOMDataStore::ContainsWrapper(this, isolate));
26 26
27 const WrapperTypeInfo* wrapper_type_info = this->GetWrapperTypeInfo(); 27 const WrapperTypeInfo* wrapper_type_info = this->GetWrapperTypeInfo();
28 v8::Local<v8::Object> wrapper = 28 v8::Local<v8::Object> wrapper =
29 v8::ArrayBuffer::New(isolate, Data(), ByteLength()); 29 v8::ArrayBuffer::New(isolate, Data(), ByteLength());
30 30
31 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper); 31 return AssociateWithWrapper(isolate, wrapper_type_info, wrapper);
32 } 32 }
33 33
34 } // namespace blink 34 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayBuffer.h ('k') | third_party/WebKit/Source/core/dom/DOMArrayBufferBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698