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

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

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... 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
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 "wtf/CheckedNumeric.h" 9 #include "wtf/CheckedNumeric.h"
10 #include "wtf/typed_arrays/ArrayBufferView.h" 10 #include "wtf/typed_arrays/ArrayBufferView.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 RefPtr<DataView> dataView = 49 RefPtr<DataView> dataView =
50 DataView::create(buffer->buffer(), byteOffset, byteLength); 50 DataView::create(buffer->buffer(), byteOffset, byteLength);
51 return new DOMDataView(dataView, buffer); 51 return new DOMDataView(dataView, buffer);
52 } 52 }
53 53
54 v8::Local<v8::Object> DOMDataView::wrap(v8::Isolate* isolate, 54 v8::Local<v8::Object> DOMDataView::wrap(v8::Isolate* isolate,
55 v8::Local<v8::Object> creationContext) { 55 v8::Local<v8::Object> creationContext) {
56 DCHECK(!DOMDataStore::containsWrapper(this, isolate)); 56 DCHECK(!DOMDataStore::containsWrapper(this, isolate));
57 57
58 const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo(); 58 const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo();
59 v8::Local<v8::Value> v8Buffer = toV8(buffer(), creationContext, isolate); 59 v8::Local<v8::Value> v8Buffer = ToV8(buffer(), creationContext, isolate);
60 if (v8Buffer.IsEmpty()) 60 if (v8Buffer.IsEmpty())
61 return v8::Local<v8::Object>(); 61 return v8::Local<v8::Object>();
62 DCHECK(v8Buffer->IsArrayBuffer()); 62 DCHECK(v8Buffer->IsArrayBuffer());
63 63
64 v8::Local<v8::Object> wrapper = v8::DataView::New( 64 v8::Local<v8::Object> wrapper = v8::DataView::New(
65 v8Buffer.As<v8::ArrayBuffer>(), byteOffset(), byteLength()); 65 v8Buffer.As<v8::ArrayBuffer>(), 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/css/cssom/CSSStyleValue.cpp ('k') | third_party/WebKit/Source/core/dom/DOMTypedArray.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698