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

Side by Side Diff: Source/bindings/modules/v8/ToV8Utilities.h

Issue 972153002: [bindings] Remove custom binding usage in SQLResultSetRowList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@test
Patch Set: CallWith=ScriptState 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
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ToV8Utilities_h
6 #define ToV8Utilities_h
7
8 #include "bindings/core/v8/V8Binding.h"
9 #include "modules/webdatabase/sqlite/SQLValue.h"
10
11 namespace blink {
12
13 inline v8::Handle<v8::Value> toV8(const SQLValue& sqlValue, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate)
haraken 2015/03/05 09:03:13 I think we should - rename this file to ToV8ForMo
vivekg 2015/03/05 09:13:53 Sure.
14 {
15 switch (sqlValue.type()) {
16 case SQLValue::NullValue:
17 return v8::Null(isolate);
18 case SQLValue::NumberValue:
19 return v8::Number::New(isolate, sqlValue.number());
20 case SQLValue::StringValue:
21 return v8String(isolate, sqlValue.string());
22 }
23 ASSERT_NOT_REACHED();
24 return v8::Local<v8::Value>();
25 }
26
27 } // namespace blink
28
29 #endif // ToV8Utilities_h
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698