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

Unified Diff: Source/bindings/core/v8/NativeValueTraits.h

Issue 1009503003: [bindings] Introduce ScriptValue.to<T> to convert to native values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding new file NativeValueTraits.h 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValue.h » ('j') | Source/bindings/core/v8/V8Binding.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/NativeValueTraits.h
diff --git a/Source/bindings/core/v8/NativeValueTraits.h b/Source/bindings/core/v8/NativeValueTraits.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdbfdfe9424f6ecf2a3100547a3b6df9dd8c2026
--- /dev/null
+++ b/Source/bindings/core/v8/NativeValueTraits.h
@@ -0,0 +1,26 @@
+// 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 NativeValueTraits_h
+#define NativeValueTraits_h
+
+namespace v8 {
Yuki 2015/03/16 08:03:07 You'd better include <v8.h>, which is a third part
vivekg 2015/03/16 08:32:17 Done.
+class Isolate;
+template <typename T>
+class Local;
+class Value;
+} // namespace v8
+
+namespace blink {
+
+class ExceptionState;
+
+template <typename T>
+struct NativeValueTraits {
+ static T nativeValue(const v8::Local<v8::Value>&, v8::Isolate*, ExceptionState&);
Yuki 2015/03/16 08:03:07 I'm not quite sure why this has been const v8::Loc
vivekg 2015/03/16 08:32:17 I will take this up as follow up patch.
+};
+
+} // namespace blink
+
+#endif // NativeValueTraits_h
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValue.h » ('j') | Source/bindings/core/v8/V8Binding.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698