return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8Value()));
}
-ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node)
+ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* scriptState, Node* node)
{
- v8::Isolate* isolate = state->isolate();
+ v8::Isolate* isolate = scriptState->isolate();
v8::HandleScope scope(isolate);
- v8::Local<v8::Context> context = state->context();
+ v8::Local<v8::Context> context = scriptState->context();
v8::Context::Scope contextScope(context);
ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeAsScriptValue", "InjectedScriptHost", v8::Handle<v8::Object>(), isolate);
if (!BindingSecurity::shouldAllowAccessToNode(isolate, node, exceptionState))
- return ScriptValue(v8::Null(isolate), isolate);
- return ScriptValue(toV8(node, v8::Handle<v8::Object>(), isolate), isolate);
+ return ScriptValue(scriptState, v8::Null(isolate));
+ return ScriptValue(scriptState, toV8(node, v8::Handle<v8::Object>(), isolate));
}
void V8InjectedScriptHost::inspectedObjectMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder());
InjectedScriptHost::InspectableObject* object = host->inspectedObject(info[0]->ToInt32()->Value());
- v8SetReturnValue(info, object->get(ScriptState::current()).v8Value());
+ v8SetReturnValue(info, object->get(ScriptState::current(info.GetIsolate())).v8Value());
}
void V8InjectedScriptHost::internalConstructorNameMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder());
ScriptValue object(info[0], info.GetIsolate());
ScriptValue hints(info[1], info.GetIsolate());
- host->inspectImpl(object.toJSONValue(ScriptState::current()), hints.toJSONValue(ScriptState::current()));
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ host->inspectImpl(object.toJSONValue(scriptState), hints.toJSONValue(scriptState));
}
void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)