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

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

Issue 1020233002: [bindings] [devtools] Migrate the usage of ScriptValue.toJSONValue() to ScriptValue::to<JSONValuePt… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing 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 | « Source/bindings/core/v8/ScriptDebugServer.cpp ('k') | Source/bindings/core/v8/ScriptValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptValue.h
diff --git a/Source/bindings/core/v8/ScriptValue.h b/Source/bindings/core/v8/ScriptValue.h
index 7ad2aecaed7c51507d12e55ea33d1dd2cecd2704..a2a7441d66b14e6dc39bac93e15a1f97dae19abd 100644
--- a/Source/bindings/core/v8/ScriptValue.h
+++ b/Source/bindings/core/v8/ScriptValue.h
@@ -53,9 +53,15 @@ public:
}
template<typename T, typename... Arguments>
+ static inline T to(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState, Arguments const&... arguments)
+ {
+ return NativeValueTraits<T>::nativeValue(isolate, value, exceptionState, arguments...);
+ }
+
+ template<typename T, typename... Arguments>
static inline T to(v8::Isolate* isolate, const ScriptValue& value, ExceptionState& exceptionState, Arguments const&... arguments)
{
- return NativeValueTraits<T>::nativeValue(isolate, value.v8Value(), exceptionState, arguments...);
+ return to<T>(isolate, value.v8Value(), exceptionState, arguments...);
}
ScriptValue() { }
@@ -153,7 +159,6 @@ public:
v8::Handle<v8::Value> v8ValueUnsafe() const;
bool toString(String&) const;
- PassRefPtr<JSONValue> toJSONValue(ScriptState*) const;
static ScriptValue createNull(ScriptState*);
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.cpp ('k') | Source/bindings/core/v8/ScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698