| Index: Source/bindings/modules/v8/V8BindingForModules.h
|
| diff --git a/Source/bindings/modules/v8/V8BindingForModules.h b/Source/bindings/modules/v8/V8BindingForModules.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..72eedf5a3a5ce476bd981a86a0c68203d8680a39
|
| --- /dev/null
|
| +++ b/Source/bindings/modules/v8/V8BindingForModules.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef V8BindingForModules_h
|
| +#define V8BindingForModules_h
|
| +
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +#include "modules/webdatabase/sqlite/SQLValue.h"
|
| +
|
| +namespace blink {
|
| +
|
| +template <>
|
| +struct NativeValueTraits<SQLValue> {
|
| + static SQLValue nativeValue(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
|
| + {
|
| + if (value.IsEmpty() || value->IsNull())
|
| + return SQLValue();
|
| + if (value->IsNumber())
|
| + return SQLValue(value->NumberValue());
|
| + V8StringResource<> stringValue(value);
|
| + if (!stringValue.prepare(exceptionState))
|
| + return SQLValue();
|
| + return SQLValue(stringValue);
|
| + }
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // V8BindingForModules_h
|
|
|