summaryrefslogtreecommitdiffstats
path: root/webkit/glue/devtools/debugger_agent_impl.cc
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 13:32:44 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 13:32:44 +0000
commit7c8d46dd6dcd73e56cce98a7f12f79f9fbe7e017 (patch)
treefecd514d27ae13e6ec72ca3b156615c100d54b9c /webkit/glue/devtools/debugger_agent_impl.cc
parent6b0d6339349505d439d296ceec12ae9afc9d4062 (diff)
downloadchromium_src-7c8d46dd6dcd73e56cce98a7f12f79f9fbe7e017.zip
chromium_src-7c8d46dd6dcd73e56cce98a7f12f79f9fbe7e017.tar.gz
chromium_src-7c8d46dd6dcd73e56cce98a7f12f79f9fbe7e017.tar.bz2
DevTools: Add support for dumping objects into the console. (Take 2).
BUG=13851 Review URL: http://codereview.chromium.org/126270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/devtools/debugger_agent_impl.cc')
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.cc29
1 files changed, 1 insertions, 28 deletions
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 41ee6d1..4fb5f243 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -9,7 +9,6 @@
#include <wtf/Vector.h>
#include "Document.h"
-#include "Node.h"
#include "Page.h"
#undef LOG
@@ -30,7 +29,6 @@
using WebCore::DOMWindow;
using WebCore::Document;
using WebCore::Frame;
-using WebCore::Node;
using WebCore::Page;
using WebCore::String;
using WebCore::V8ClassIndex;
@@ -154,7 +152,6 @@ void DebuggerAgentImpl::ResetUtilityContext(
String DebuggerAgentImpl::ExecuteUtilityFunction(
v8::Handle<v8::Context> context,
const String &function_name,
- Node* node,
const String& json_args,
String* exception) {
v8::HandleScope scope;
@@ -163,20 +160,17 @@ String DebuggerAgentImpl::ExecuteUtilityFunction(
v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(
context->Global()->Get(v8::String::New("devtools$$dispatch")));
- v8::Handle<v8::Value> node_wrapper =
- V8Proxy::ToV8Object(V8ClassIndex::NODE, node);
v8::Handle<v8::String> function_name_wrapper = v8::Handle<v8::String>(
v8::String::New(function_name.utf8().data()));
v8::Handle<v8::String> json_args_wrapper = v8::Handle<v8::String>(
v8::String::New(json_args.utf8().data()));
v8::Handle<v8::Value> args[] = {
function_name_wrapper,
- node_wrapper,
json_args_wrapper
};
v8::TryCatch try_catch;
- v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 3, args);
+ v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 2, args);
if (try_catch.HasCaught()) {
*exception = WebCore::ToWebCoreString(try_catch.Message()->Get());
return "";
@@ -186,27 +180,6 @@ String DebuggerAgentImpl::ExecuteUtilityFunction(
}
}
-String DebuggerAgentImpl::EvaluateJavaScript(
- Frame* frame,
- const String &source_code,
- bool* is_exception) {
- v8::HandleScope scope;
- v8::Handle<v8::Context> context = V8Proxy::GetContext(frame);
- v8::Context::Scope context_scope(context);
- v8::Local<v8::String> code = v8ExternalString(source_code);
-
- V8Proxy* proxy = V8Proxy::retrieve(frame);
- v8::TryCatch try_catch;
- v8::Handle<v8::Script> script = proxy->CompileScript(code, "", 0);
- v8::Local<v8::Value> object = proxy->RunScript(script, true);
- if (try_catch.HasCaught()) {
- *is_exception = true;
- return WebCore::ToWebCoreString(try_catch.Message()->Get());
- } else {
- return WebCore::toWebCoreStringWithNullCheck(object);
- }
-}
-
WebCore::Page* DebuggerAgentImpl::GetPage() {
return web_view_impl_->page();
}