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

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

Issue 949193002: [bindings] Remove SQLTransaction's usage of custom binding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed exception 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 V8BindingForModules_h
6 #define V8BindingForModules_h
7
8 #include "bindings/core/v8/V8Binding.h"
9 #include "modules/webdatabase/sqlite/SQLValue.h"
10
11 namespace blink {
12
13 template <>
14 struct NativeValueTraits<SQLValue> {
15 static SQLValue nativeValue(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
16 {
17 if (value.IsEmpty() || value->IsNull())
18 return SQLValue();
19 if (value->IsNumber())
20 return SQLValue(value->NumberValue());
21 V8StringResource<> stringValue(value);
22 if (!stringValue.prepare(exceptionState))
23 return SQLValue();
24 return SQLValue(stringValue);
25 }
26 };
27
28 } // namespace blink
29
30 #endif // V8BindingForModules_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698