mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8289610: Degrade Thread.stop
Reviewed-by: rriggs, cjplummer, jpai, mchung, prr, mullan
This commit is contained in:
parent
05c8cabdad
commit
acd5bcfc88
26 changed files with 179 additions and 226 deletions
|
@ -2430,8 +2430,6 @@ public class ObjectInputStream
|
|||
// Read fields of the current descriptor into a new FieldValues and discard
|
||||
new FieldValues(slotDesc, true);
|
||||
} else if (slotDesc.hasReadObjectMethod()) {
|
||||
ThreadDeath t = null;
|
||||
boolean reset = false;
|
||||
SerialCallbackContext oldContext = curContext;
|
||||
if (oldContext != null)
|
||||
oldContext.check();
|
||||
|
@ -2450,19 +2448,10 @@ public class ObjectInputStream
|
|||
*/
|
||||
handles.markException(passHandle, ex);
|
||||
} finally {
|
||||
do {
|
||||
try {
|
||||
curContext.setUsed();
|
||||
if (oldContext!= null)
|
||||
oldContext.check();
|
||||
curContext = oldContext;
|
||||
reset = true;
|
||||
} catch (ThreadDeath x) {
|
||||
t = x; // defer until reset is true
|
||||
}
|
||||
} while (!reset);
|
||||
if (t != null)
|
||||
throw t;
|
||||
curContext.setUsed();
|
||||
if (oldContext!= null)
|
||||
oldContext.check();
|
||||
curContext = oldContext;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue