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

Side by Side Diff: test/cctest/test-debug.cc

Issue 303693010: Remove unused debug API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6629 matching lines...) Expand 10 before | Expand all | Expand 10 after
6640 } 6640 }
6641 6641
6642 6642
6643 TEST(ProcessDebugMessagesThreaded) { 6643 TEST(ProcessDebugMessagesThreaded) {
6644 DebugLocalContext env; 6644 DebugLocalContext env;
6645 v8::Isolate* isolate = env->GetIsolate(); 6645 v8::Isolate* isolate = env->GetIsolate();
6646 v8::HandleScope scope(isolate); 6646 v8::HandleScope scope(isolate);
6647 6647
6648 counting_message_handler_counter = 0; 6648 counting_message_handler_counter = 0;
6649 6649
6650 v8::Debug::SetMessageHandler2(CountingMessageHandler); 6650 v8::Debug::SetMessageHandler(CountingMessageHandler);
6651 send_command_thread_ = new SendCommandThread(isolate); 6651 send_command_thread_ = new SendCommandThread(isolate);
6652 send_command_thread_->Start(); 6652 send_command_thread_->Start();
6653 6653
6654 v8::Handle<v8::FunctionTemplate> start = 6654 v8::Handle<v8::FunctionTemplate> start =
6655 v8::FunctionTemplate::New(isolate, StartSendingCommands); 6655 v8::FunctionTemplate::New(isolate, StartSendingCommands);
6656 env->Global()->Set(v8_str("start"), start->GetFunction()); 6656 env->Global()->Set(v8_str("start"), start->GetFunction());
6657 6657
6658 CompileRun("start(); while (true) { }"); 6658 CompileRun("start(); while (true) { }");
6659 6659
6660 CHECK_EQ(100, counting_message_handler_counter); 6660 CHECK_EQ(100, counting_message_handler_counter);
6661 6661
6662 v8::Debug::SetMessageHandler2(NULL); 6662 v8::Debug::SetMessageHandler(NULL);
6663 CheckDebuggerUnloaded(); 6663 CheckDebuggerUnloaded();
6664 } 6664 }
6665 6665
6666 6666
6667 struct BacktraceData { 6667 struct BacktraceData {
6668 static int frame_counter; 6668 static int frame_counter;
6669 static void MessageHandler(const v8::Debug::Message& message) { 6669 static void MessageHandler(const v8::Debug::Message& message) {
6670 char print_buffer[1000]; 6670 char print_buffer[1000];
6671 v8::String::Value json(message.GetJSON()); 6671 v8::String::Value json(message.GetJSON());
6672 Utf16ToAscii(*json, json.length(), print_buffer, 1000); 6672 Utf16ToAscii(*json, json.length(), print_buffer, 1000);
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
7418 env->Global()->Set(v8_str("add_debug_break"), add_debug_break); 7418 env->Global()->Set(v8_str("add_debug_break"), add_debug_break);
7419 7419
7420 CompileRun("(function loop() {" 7420 CompileRun("(function loop() {"
7421 " for (var j = 0; j < 1000; j++) {" 7421 " for (var j = 0; j < 1000; j++) {"
7422 " for (var i = 0; i < 1000; i++) {" 7422 " for (var i = 0; i < 1000; i++) {"
7423 " if (i == 999) add_debug_break();" 7423 " if (i == 999) add_debug_break();"
7424 " }" 7424 " }"
7425 " }" 7425 " }"
7426 "})()"); 7426 "})()");
7427 } 7427 }
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698