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

Unified Diff: Source/bindings/modules/v8/ScriptValueUtilities.h

Issue 972153002: [bindings] Remove custom binding usage in SQLResultSetRowList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@test
Patch Set: Review comments addressed! Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698