OLD | NEW |
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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 } | 622 } |
623 | 623 |
624 // Run the remote debugger if requested. | 624 // Run the remote debugger if requested. |
625 if (i::FLAG_remote_debugger) { | 625 if (i::FLAG_remote_debugger) { |
626 RunRemoteDebugger(i::FLAG_debugger_port); | 626 RunRemoteDebugger(i::FLAG_debugger_port); |
627 return 0; | 627 return 0; |
628 } | 628 } |
629 | 629 |
630 // Start the debugger agent if requested. | 630 // Start the debugger agent if requested. |
631 if (i::FLAG_debugger_agent) { | 631 if (i::FLAG_debugger_agent) { |
632 v8::Debug::EnableAgent(i::FLAG_debugger_port); | 632 v8::Debug::EnableAgent("d8 shell", i::FLAG_debugger_port); |
633 } | 633 } |
634 | 634 |
635 // Start the in-process debugger if requested. | 635 // Start the in-process debugger if requested. |
636 if (i::FLAG_debugger && !i::FLAG_debugger_agent) { | 636 if (i::FLAG_debugger && !i::FLAG_debugger_agent) { |
637 v8::Debug::SetDebugEventListener(HandleDebugEvent); | 637 v8::Debug::SetDebugEventListener(HandleDebugEvent); |
638 } | 638 } |
639 } | 639 } |
640 if (run_shell) | 640 if (run_shell) |
641 RunShell(); | 641 RunShell(); |
642 for (int i = 0; i < threads.length(); i++) { | 642 for (int i = 0; i < threads.length(); i++) { |
643 i::Thread *thread = threads[i]; | 643 i::Thread *thread = threads[i]; |
644 thread->Join(); | 644 thread->Join(); |
645 delete thread; | 645 delete thread; |
646 } | 646 } |
647 OnExit(); | 647 OnExit(); |
648 return 0; | 648 return 0; |
649 } | 649 } |
650 | 650 |
651 | 651 |
652 } // namespace v8 | 652 } // namespace v8 |
653 | 653 |
654 | 654 |
655 int main(int argc, char* argv[]) { | 655 int main(int argc, char* argv[]) { |
656 return v8::Shell::Main(argc, argv); | 656 return v8::Shell::Main(argc, argv); |
657 } | 657 } |
OLD | NEW |