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

Unified Diff: Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 1021713003: [bindings] Let NativeValueTraits<T>::nativeValue be variadic function and merge various convers… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed the compiler error behind ASSERT flag 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
Index: Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
index c169b37bca1197a1324d0529837def04cd6c4c7a..1363128c7fe20c1ed137d47413fc9237a5c6b611 100644
--- a/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -356,10 +356,15 @@ void V8InjectedScriptHost::inspectMethodCustom(const v8::FunctionCallbackInfo<v8
return;
InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ v8::Isolate* isolate = info.GetIsolate();
+ ScriptState* scriptState = ScriptState::current(isolate);
ScriptValue object(scriptState, info[0]);
ScriptValue hints(scriptState, info[1]);
- host->inspectImpl(object.toJSONValue(scriptState), hints.toJSONValue(scriptState));
+ ScriptState::Scope scope(scriptState);
+ NonThrowableExceptionState exceptionState;
+ RefPtr<JSONValue> jsonObject = ScriptValue::to<JSONValuePtr>(isolate, object, exceptionState);
+ RefPtr<JSONValue> jsonHints = ScriptValue::to<JSONValuePtr>(isolate, hints, exceptionState);
+ host->inspectImpl(jsonObject, jsonHints);
}
void V8InjectedScriptHost::evalMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)

Powered by Google App Engine
This is Rietveld 408576698