Changed preemption related stuff in debugger entry.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 Mar 2009 09:28:01 +0000 (09:28 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 Mar 2009 09:28:01 +0000 (09:28 +0000)
Fixed an assertion which did not hold when the debugger was recursively entered.

Removed the clearing of the preemption flag in debugger entry as there was no need for it. The handling of preemption by the stack guard takes care of the in debugger situation anyway.
Review URL: http://codereview.chromium.org/48004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/debug.h

index e540c4a..51b96be 100644 (file)
@@ -574,21 +574,11 @@ class EnterDebugger BASE_EMBEDDED {
   EnterDebugger()
       : prev_(Debug::debugger_entry()),
         has_js_frames_(!it_.done()) {
-    ASSERT(!Debug::preemption_pending());
+    ASSERT(prev_ == NULL ? !Debug::preemption_pending() : true);
 
     // Link recursive debugger entry.
     Debug::set_debugger_entry(this);
 
-    // If a preemption is pending when first entering the debugger clear it as
-    // we don't want preemption happening while executing JavaScript in the
-    // debugger. When recursively entering the debugger the preemption flag
-    // cannot be set as this is disabled while in the debugger (see
-    // RuntimePreempt).
-    if (prev_ == NULL && StackGuard::IsPreempted()) {
-      StackGuard::Continue(PREEMPT);
-    }
-    ASSERT(!StackGuard::IsPreempted());
-
     // Store the previous break id and frame id.
     break_id_ = Debug::break_id();
     break_frame_id_ = Debug::break_frame_id();