OLD | NEW |
---|---|
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
615 | 615 |
616 | 616 |
617 | 617 |
618 | 618 |
619 | 619 |
620 // Default break enabled. | 620 // Default break enabled. |
621 bool Debug::disable_break_ = false; | 621 bool Debug::disable_break_ = false; |
622 | 622 |
623 // Default call debugger on uncaught exception. | 623 // Default call debugger on uncaught exception. |
624 bool Debug::break_on_exception_ = false; | 624 bool Debug::break_on_exception_ = false; |
625 #if defined(WEBOS__) | |
Søren Thygesen Gjesse
2011/01/03 08:56:07
I think this change of the default is OK for all p
marklam
2011/01/04 20:12:13
Done. Made it unconditional.
| |
626 bool Debug::break_on_uncaught_exception_ = false; | |
627 #else | |
625 bool Debug::break_on_uncaught_exception_ = true; | 628 bool Debug::break_on_uncaught_exception_ = true; |
629 #endif | |
626 | 630 |
627 Handle<Context> Debug::debug_context_ = Handle<Context>(); | 631 Handle<Context> Debug::debug_context_ = Handle<Context>(); |
628 Code* Debug::debug_break_return_ = NULL; | 632 Code* Debug::debug_break_return_ = NULL; |
629 Code* Debug::debug_break_slot_ = NULL; | 633 Code* Debug::debug_break_slot_ = NULL; |
630 | 634 |
631 | 635 |
632 void ScriptCache::Add(Handle<Script> script) { | 636 void ScriptCache::Add(Handle<Script> script) { |
633 // Create an entry in the hash map for the script. | 637 // Create an entry in the hash map for the script. |
634 int id = Smi::cast(script->id())->value(); | 638 int id = Smi::cast(script->id())->value(); |
635 HashMap::Entry* entry = | 639 HashMap::Entry* entry = |
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2733 // it starts. | 2737 // it starts. |
2734 // Provide stub message handler; V8 auto-continues each suspend | 2738 // Provide stub message handler; V8 auto-continues each suspend |
2735 // when there is no message handler; we doesn't need it. | 2739 // when there is no message handler; we doesn't need it. |
2736 // Once become suspended, V8 will stay so indefinitely long, until remote | 2740 // Once become suspended, V8 will stay so indefinitely long, until remote |
2737 // debugger connects and issues "continue" command. | 2741 // debugger connects and issues "continue" command. |
2738 Debugger::message_handler_ = StubMessageHandler2; | 2742 Debugger::message_handler_ = StubMessageHandler2; |
2739 v8::Debug::DebugBreak(); | 2743 v8::Debug::DebugBreak(); |
2740 } | 2744 } |
2741 | 2745 |
2742 if (Socket::Setup()) { | 2746 if (Socket::Setup()) { |
2743 agent_ = new DebuggerAgent(name, port); | 2747 if (agent_ == NULL) { |
2744 agent_->Start(); | 2748 agent_ = new DebuggerAgent(name, port); |
2749 agent_->Start(); | |
2750 } | |
2745 return true; | 2751 return true; |
2746 } | 2752 } |
2747 | 2753 |
2748 return false; | 2754 return false; |
2749 } | 2755 } |
2750 | 2756 |
2751 | 2757 |
2752 void Debugger::StopAgent() { | 2758 void Debugger::StopAgent() { |
2753 if (agent_ != NULL) { | 2759 if (agent_ != NULL) { |
2754 agent_->Shutdown(); | 2760 agent_->Shutdown(); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3070 { | 3076 { |
3071 Locker locker; | 3077 Locker locker; |
3072 Debugger::CallMessageDispatchHandler(); | 3078 Debugger::CallMessageDispatchHandler(); |
3073 } | 3079 } |
3074 } | 3080 } |
3075 } | 3081 } |
3076 | 3082 |
3077 #endif // ENABLE_DEBUGGER_SUPPORT | 3083 #endif // ENABLE_DEBUGGER_SUPPORT |
3078 | 3084 |
3079 } } // namespace v8::internal | 3085 } } // namespace v8::internal |
OLD | NEW |