OLD | NEW |
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 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 ProcessDebugEvent(v8::AfterCompile, | 2819 ProcessDebugEvent(v8::AfterCompile, |
2820 Handle<JSObject>::cast(event_data), | 2820 Handle<JSObject>::cast(event_data), |
2821 true); | 2821 true); |
2822 } | 2822 } |
2823 | 2823 |
2824 | 2824 |
2825 void Debugger::OnScriptCollected(int id) { | 2825 void Debugger::OnScriptCollected(int id) { |
2826 HandleScope scope(isolate_); | 2826 HandleScope scope(isolate_); |
2827 | 2827 |
2828 // No more to do if not debugging. | 2828 // No more to do if not debugging. |
| 2829 if (isolate_->debug()->InDebugger()) return; |
2829 if (!IsDebuggerActive()) return; | 2830 if (!IsDebuggerActive()) return; |
2830 if (!Debugger::EventActive(v8::ScriptCollected)) return; | 2831 if (!Debugger::EventActive(v8::ScriptCollected)) return; |
2831 | 2832 |
2832 // Enter the debugger. | 2833 // Enter the debugger. |
2833 EnterDebugger debugger; | 2834 EnterDebugger debugger; |
2834 if (debugger.FailedToEnter()) return; | 2835 if (debugger.FailedToEnter()) return; |
2835 | 2836 |
2836 // Create the script collected state object. | 2837 // Create the script collected state object. |
2837 bool caught_exception = false; | 2838 bool caught_exception = false; |
2838 Handle<Object> event_data = MakeScriptCollectedEvent(id, | 2839 Handle<Object> event_data = MakeScriptCollectedEvent(id, |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3766 { | 3767 { |
3767 Locker locker; | 3768 Locker locker; |
3768 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3769 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
3769 } | 3770 } |
3770 } | 3771 } |
3771 } | 3772 } |
3772 | 3773 |
3773 #endif // ENABLE_DEBUGGER_SUPPORT | 3774 #endif // ENABLE_DEBUGGER_SUPPORT |
3774 | 3775 |
3775 } } // namespace v8::internal | 3776 } } // namespace v8::internal |
OLD | NEW |