OLD | NEW |
---|---|
(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 | |
OLD | NEW |