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

Side by Side Diff: src/d8.cc

Issue 27202: Change the D8 JavaScript debugger to fully use the JSON protocol.... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/d8.h ('k') | src/d8.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 Context::Scope context_scope(utility_context_); 225 Context::Scope context_scope(utility_context_);
226 Handle<Object> global = utility_context_->Global(); 226 Handle<Object> global = utility_context_->Global();
227 Handle<Value> fun = global->Get(String::New("GetCompletions")); 227 Handle<Value> fun = global->Get(String::New("GetCompletions"));
228 static const int kArgc = 3; 228 static const int kArgc = 3;
229 Handle<Value> argv[kArgc] = { evaluation_context_->Global(), text, full }; 229 Handle<Value> argv[kArgc] = { evaluation_context_->Global(), text, full };
230 Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv); 230 Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
231 return handle_scope.Close(Handle<Array>::Cast(val)); 231 return handle_scope.Close(Handle<Array>::Cast(val));
232 } 232 }
233 233
234 234
235 Handle<String> Shell::DebugEventToText(Handle<Object> event) { 235 Handle<String> Shell::DebugEventToText(Handle<String> event) {
236 HandleScope handle_scope; 236 HandleScope handle_scope;
237 Context::Scope context_scope(utility_context_); 237 Context::Scope context_scope(utility_context_);
238 Handle<Object> global = utility_context_->Global(); 238 Handle<Object> global = utility_context_->Global();
239 Handle<Value> fun = global->Get(String::New("DebugEventToText")); 239 Handle<Value> fun = global->Get(String::New("DebugEventToText"));
240 TryCatch try_catch; 240 TryCatch try_catch;
241 try_catch.SetVerbose(true); 241 try_catch.SetVerbose(true);
242 static const int kArgc = 1; 242 static const int kArgc = 1;
243 Handle<Value> argv[kArgc] = { event }; 243 Handle<Value> argv[kArgc] = { event };
244 Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv); 244 Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv);
245 if (try_catch.HasCaught()) { 245 if (try_catch.HasCaught()) {
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return 0; 605 return 0;
606 } 606 }
607 607
608 608
609 } // namespace v8 609 } // namespace v8
610 610
611 611
612 int main(int argc, char* argv[]) { 612 int main(int argc, char* argv[]) {
613 return v8::Shell::Main(argc, argv); 613 return v8::Shell::Main(argc, argv);
614 } 614 }
OLDNEW
« 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