Revision: 4527
Author: [email protected]
Date: Wed Apr 28 02:18:53 2010
Log: Fix test-debug: make sure debugger is unloaded before running next test
Review URL: http://codereview.chromium.org/1704015
http://code.google.com/p/v8/source/detail?r=4527
Modified:
/branches/bleeding_edge/src/debug.h
/branches/bleeding_edge/test/cctest/test-debug.cc
=======================================
--- /branches/bleeding_edge/src/debug.h Wed Apr 28 01:23:20 2010
+++ /branches/bleeding_edge/src/debug.h Wed Apr 28 02:18:53 2010
@@ -670,6 +670,7 @@
// Unload the debugger if possible. Only called when no debugger is
currently
// active.
static void UnloadDebugger();
+ friend void ForceUnloadDebugger(); // In test-debug.cc
inline static bool EventActive(v8::DebugEvent event) {
ScopedLock with(debugger_access_);
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Wed Apr 28 01:23:20
2010
+++ /branches/bleeding_edge/test/cctest/test-debug.cc Wed Apr 28 02:18:53
2010
@@ -434,6 +434,12 @@
}
}
}
+
+
+void ForceUnloadDebugger() {
+ Debugger::never_unload_debugger_ = false;
+ Debugger::UnloadDebugger();
+}
} } // namespace v8::internal
@@ -6146,5 +6152,8 @@
v8::Local<v8::Context> context1 = v8::Debug::GetDebugContext();
v8::Local<v8::Context> context2 = v8::Debug::GetDebugContext();
CHECK_EQ(*context1, *context2);
+ // Make sure debugger is unloaded before running other tests.
+ v8::internal::ForceUnloadDebugger();
+ CheckDebuggerUnloaded();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev