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

Unified Diff: src/debug.cc

Issue 548045: Make debugger unloading deferred operation (Closed)
Patch Set: remove TODO Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index c869d16f88c607bf922cf935f1e93f00932ea5be..9a02355f1b2c1a56c74e0cdccdd5dea76da15c19 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2381,17 +2381,12 @@ void Debugger::ListenersChanged() {
if (IsDebuggerActive()) {
// Disable the compilation cache when the debugger is active.
CompilationCache::Disable();
+ debugger_unload_pending_ = false;
} else {
CompilationCache::Enable();
-
// Unload the debugger if event listener and message handler cleared.
- if (Debug::InDebugger()) {
- // If we are in debugger set the flag to unload the debugger when last
- // EnterDebugger on the current stack is destroyed.
- debugger_unload_pending_ = true;
- } else {
- UnloadDebugger();
- }
+ // Schedule this for later, because we may be in non-V8 thread.
+ debugger_unload_pending_ = true;
}
}
« no previous file with comments | « src/debug.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698