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) |