Index: Source/bindings/modules/v8/ScriptValueUtilities.h |
diff --git a/Source/bindings/modules/v8/ScriptValueUtilities.h b/Source/bindings/modules/v8/ScriptValueUtilities.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8bc2b128abfe4430ab47b3c1872febf885a26f55 |
--- /dev/null |
+++ b/Source/bindings/modules/v8/ScriptValueUtilities.h |
@@ -0,0 +1,25 @@ |
+// 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 ScriptValueUtilities_h |
+#define ScriptValueUtilities_h |
+ |
+#include "bindings/core/v8/ScriptValue.h" |
+#include "bindings/core/v8/ToV8.h" |
+#include "bindings/modules/v8/ToV8Utilities.h" |
+#include "modules/webdatabase/sqlite/SQLValue.h" |
+ |
+namespace blink { |
+ |
+ScriptValue toScriptValue(const Vector<std::pair<String, SQLValue>>& value) |
+{ |
+ v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
+ ScriptState* scriptState = ScriptState::current(isolate); |
Jens Widell
2015/03/04 15:53:27
It would be better if this function just took a Sc
|
+ RELEASE_ASSERT(scriptState); |
+ return ScriptValue(scriptState, toV8(value, scriptState->context()->Global(), isolate)); |
+} |
+ |
+} // namespace blink |
+ |
+#endif // ScriptValueUtilities_h |