Chromium Code Reviews| Index: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
| diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
| index b044dbe8b2bc698bb36ffc0338113d4df8983926..6e178cbaa2e6cab31203a2a39a7ef6e05296a328 100644 |
| --- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
| +++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
| @@ -45,6 +45,7 @@ |
| #include "V8Uint32Array.h" |
| #include "V8Uint8Array.h" |
| #include "V8Uint8ClampedArray.h" |
| +#include "bindings/dart/DartHandleProxy.h" |
| #include "bindings/tests/results/V8Float64Array.h" |
| #include "bindings/v8/BindingSecurity.h" |
| #include "bindings/v8/ScriptDebugServer.h" |
| @@ -63,9 +64,15 @@ namespace WebCore { |
| Node* InjectedScriptHost::scriptValueAsNode(ScriptValue value) |
| { |
| + v8::HandleScope scope; |
| if (!value.isObject() || value.isNull()) |
| return 0; |
| - return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8ValueRaw())); |
| + |
| + v8::Handle<v8::Object> handle = v8::Handle<v8::Object>::Cast(value.v8ValueRaw()); |
|
Anton Muhin
2013/07/16 13:27:40
it might be not a restriction now, but we tried re
Jacob
2013/07/16 16:44:59
My impression is that restriction has been lifted
|
| + if (DartHandleProxy::isDartProxy(handle)) |
| + return DartHandleProxy::toNativeNode(handle); |
| + |
| + return V8Node::toNative(handle); |
| } |
| ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node) |
| @@ -177,6 +184,12 @@ void V8InjectedScriptHost::typeMethodCustom(const v8::FunctionCallbackInfo<v8::V |
| v8SetReturnValue(args, v8::String::NewSymbol("array")); |
| return; |
| } |
| + if (DartHandleProxy::isDartProxy(value)) { |
| + const char* type = DartHandleProxy::getType(value); |
| + if (type) |
| + v8SetReturnValue(args, v8::String::NewSymbol(type)); |
| + return; |
| + } |
| } |
| void V8InjectedScriptHost::functionDetailsMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |