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

Unified Diff: src/d8.cc

Issue 27330: Unify the handling of the event and response JSON in developer shell debugger... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « src/d8.h ('k') | src/d8.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
===================================================================
--- src/d8.cc (revision 1398)
+++ src/d8.cc (working copy)
@@ -232,21 +232,14 @@
}
-Handle<String> Shell::DebugEventToText(Handle<String> event) {
- HandleScope handle_scope;
+Handle<Object> Shell::DebugMessageDetails(Handle<String> message) {
Context::Scope context_scope(utility_context_);
Handle<Object> global = utility_context_->Global();
- Handle<Value> fun = global->Get(String::New("DebugEventToText"));
- TryCatch try_catch;
- try_catch.SetVerbose(true);
+ Handle<Value> fun = global->Get(String::New("DebugMessageDetails"));
static const int kArgc = 1;
- Handle<Value> argv[kArgc] = { event };
+ Handle<Value> argv[kArgc] = { message };
Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
- if (try_catch.HasCaught()) {
- return handle_scope.Close(try_catch.Exception()->ToString());
- } else {
- return handle_scope.Close(Handle<String>::Cast(val));
- }
+ return Handle<Object>::Cast(val);
}
@@ -261,17 +254,6 @@
}
-Handle<Object> Shell::DebugResponseDetails(Handle<String> response) {
- Context::Scope context_scope(utility_context_);
- Handle<Object> global = utility_context_->Global();
- Handle<Value> fun = global->Get(String::New("DebugResponseDetails"));
- static const int kArgc = 1;
- Handle<Value> argv[kArgc] = { response };
- Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
- return Handle<Object>::Cast(val);
-}
-
-
int32_t* Counter::Bind(const char* name) {
int i;
for (i = 0; i < kMaxNameSize - 1 && name[i]; i++)
« no previous file with comments | « src/d8.h ('k') | src/d8.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698