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

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

Issue 18169002: Improve Dart Debugger performance and robustness by creating Dart wrappers using the standard SetNa… (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: code review fixes Created 7 years, 5 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
« Source/bindings/v8/V8Binding.cpp ('K') | « Source/bindings/v8/V8Binding.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« Source/bindings/v8/V8Binding.cpp ('K') | « Source/bindings/v8/V8Binding.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698