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

Side by Side Diff: Source/bindings/modules/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: Addition of new file ToV8.h for modules 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698