[hg] main-silver: #225893: Do not check suspended state and susp...

  • From:
  • To:
  • Subject: [hg] main-silver: #225893: Do not check suspended state and susp...
  • Date: Thu, 07 Mar 2013 13:00:37 -0800

changeset 2167f873930e in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/2167f873930e
description:
        #225893: Do not check suspended state and suspend count of threads 
which have died.

diffstat:

 debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java |  
22 +++++-----
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (46 lines):

diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java
--- a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java
+++ b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java
@@ -331,6 +331,16 @@
             debugger.getThreadsCache().assureThreadIsCached(thref);
         }
         boolean suspendedCurrentThread = suspendPolicy == 
EventRequest.SUSPEND_EVENT_THREAD && thref != null;
+        // Check if it's a thread death event
+        boolean isThreadDeath = false;
+        for (Event e: eventSet) {
+            if (e instanceof ThreadDeathEvent) {
+                isThreadDeath = true;
+            } else {
+                isThreadDeath = false;
+                break;
+            }
+        }
         if (!silent) {
             if (suspendedAll) {
                 eventAccessLock = debugger.accessLock.writeLock();
@@ -343,7 +353,7 @@
             }
             if (eventAccessLock != null) {
                 eventAccessLock.lock();
-                if (thref != null) {
+                if (thref != null && !isThreadDeath) {
                     try {
                         if (!ThreadReferenceWrapper.isSuspended(thref)) {
                             // Can not do anything, someone already resumed 
the thread in the mean time.
@@ -506,16 +516,6 @@
             logger.fine("  resume = "+resume+", startEventOnly = 
"+startEventOnly);
         }
         if (isThreadEvent && suspendPolicy == 
EventRequest.SUSPEND_EVENT_THREAD && !resume) {
-            // Check if it's a thread death event
-            boolean isThreadDeath = false;
-            for (Event e: eventSet) {
-                if (e instanceof ThreadDeathEvent) {
-                    isThreadDeath = true;
-                } else {
-                    isThreadDeath = false;
-                    break;
-                }
-            }
             // We must resume the thread death event, because otherwise 
nobody would do that in this case.
             if (isThreadDeath) {
                 resume = true;

[hg] main-silver: #225893: Do not check suspended state and susp...

mentlicher 03/07/2013

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close