Chromium Code Reviews| 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 BINDINGS_MODULES_V8_ToV8_h | |
|
vivekg
2015/03/04 13:34:04
Presubmit throws an error here:
Source/bindings/m
Yuki
2015/03/04 14:11:04
I personally think the style guide is wrong. As w
| |
| 6 #define BINDINGS_MODULES_V8_ToV8_h | |
| 7 | |
| 8 #include "bindings/core/v8/V8Binding.h" | |
| 9 #include "modules/webdatabase/sqlite/SQLValue.h" | |
| 10 | |
| 11 #include <v8.h> | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 inline v8::Handle<v8::Value> toV8(const SQLValue& sqlValue, v8::Isolate* isolate ) | |
|
Yuki
2015/03/04 14:11:04
The signature of toV8() functions must be
v8::Ha
| |
| 16 { | |
| 17 switch (sqlValue.type()) { | |
| 18 case SQLValue::NullValue: | |
| 19 return v8::Null(isolate); | |
| 20 case SQLValue::NumberValue: | |
| 21 return v8::Number::New(isolate, sqlValue.number()); | |
| 22 case SQLValue::StringValue: | |
| 23 return v8String(isolate, sqlValue.string()); | |
| 24 } | |
| 25 ASSERT_NOT_REACHED(); | |
| 26 return v8::Local<v8::Value>(); | |
| 27 } | |
| 28 | |
| 29 } // namespace blink | |
| 30 | |
| 31 #endif // BINDINGS_MODULES_V8_ToV8_h | |
| 32 | |
| OLD | NEW |