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

Side by Side Diff: Source/bindings/core/v8/ToV8.h

Issue 972153002: [bindings] Remove custom binding usage in SQLResultSetRowList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@test
Patch Set: Patch for landing Created 5 years, 9 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
« no previous file with comments | « Source/bindings/core/v8/ScriptValue.h ('k') | Source/bindings/core/v8/ToV8Test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ToV8_h 5 #ifndef ToV8_h
6 #define ToV8_h 6 #define ToV8_h
7 7
8 #include "bindings/core/v8/DOMDataStore.h" 8 #include "bindings/core/v8/DOMDataStore.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 return toV8SequenceInternal(value, creationContext, isolate); 210 return toV8SequenceInternal(value, creationContext, isolate);
211 } 211 }
212 212
213 template<typename T, size_t inlineCapacity> 213 template<typename T, size_t inlineCapacity>
214 inline v8::Handle<v8::Value> toV8(const HeapVector<T, inlineCapacity>& value, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 214 inline v8::Handle<v8::Value> toV8(const HeapVector<T, inlineCapacity>& value, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
215 { 215 {
216 return toV8SequenceInternal(value, creationContext, isolate); 216 return toV8SequenceInternal(value, creationContext, isolate);
217 } 217 }
218 218
219 template<typename T>
220 inline v8::Handle<v8::Value> toV8(const Vector<std::pair<String, T>>& value, v8: :Handle<v8::Object> creationContext, v8::Isolate* isolate)
221 {
222 v8::Local<v8::Object> object = v8::Object::New(isolate);
223 for (unsigned i = 0; i < value.size(); ++i)
224 object->Set(v8String(isolate, value[i].first), toV8(value[i].second, cre ationContext, isolate));
225 return object;
226 }
227
219 } // namespace blink 228 } // namespace blink
220 229
221 #endif // ToV8_h 230 #endif // ToV8_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptValue.h ('k') | Source/bindings/core/v8/ToV8Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698