| 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 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2458 // Send an empty command to the debugger if in a break to make JavaScript | 2458 // Send an empty command to the debugger if in a break to make JavaScript |
| 2459 // run again if the debugger is closed. | 2459 // run again if the debugger is closed. |
| 2460 if (Debug::InDebugger()) { | 2460 if (Debug::InDebugger()) { |
| 2461 ProcessCommand(Vector<const uint16_t>::empty()); | 2461 ProcessCommand(Vector<const uint16_t>::empty()); |
| 2462 } | 2462 } |
| 2463 } | 2463 } |
| 2464 } | 2464 } |
| 2465 | 2465 |
| 2466 | 2466 |
| 2467 void Debugger::ListenersChanged() { | 2467 void Debugger::ListenersChanged() { |
| 2468 Isolate* isolate = Isolate::Current(); |
| 2468 if (IsDebuggerActive()) { | 2469 if (IsDebuggerActive()) { |
| 2469 // Disable the compilation cache when the debugger is active. | 2470 // Disable the compilation cache when the debugger is active. |
| 2470 CompilationCache::Disable(); | 2471 isolate->compilation_cache()->Disable(); |
| 2471 debugger_unload_pending_ = false; | 2472 debugger_unload_pending_ = false; |
| 2472 } else { | 2473 } else { |
| 2473 CompilationCache::Enable(); | 2474 isolate->compilation_cache()->Enable(); |
| 2474 // Unload the debugger if event listener and message handler cleared. | 2475 // Unload the debugger if event listener and message handler cleared. |
| 2475 // Schedule this for later, because we may be in non-V8 thread. | 2476 // Schedule this for later, because we may be in non-V8 thread. |
| 2476 debugger_unload_pending_ = true; | 2477 debugger_unload_pending_ = true; |
| 2477 } | 2478 } |
| 2478 } | 2479 } |
| 2479 | 2480 |
| 2480 | 2481 |
| 2481 void Debugger::SetHostDispatchHandler(v8::Debug::HostDispatchHandler handler, | 2482 void Debugger::SetHostDispatchHandler(v8::Debug::HostDispatchHandler handler, |
| 2482 int period) { | 2483 int period) { |
| 2483 host_dispatch_handler_ = handler; | 2484 host_dispatch_handler_ = handler; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2927 { | 2928 { |
| 2928 Locker locker; | 2929 Locker locker; |
| 2929 Debugger::CallMessageDispatchHandler(); | 2930 Debugger::CallMessageDispatchHandler(); |
| 2930 } | 2931 } |
| 2931 } | 2932 } |
| 2932 } | 2933 } |
| 2933 | 2934 |
| 2934 #endif // ENABLE_DEBUGGER_SUPPORT | 2935 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2935 | 2936 |
| 2936 } } // namespace v8::internal | 2937 } } // namespace v8::internal |
| OLD | NEW |