mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
fix occasional freezes of JBR-3017 reproducer after the fix
(cherry picked from commit 7e6db54f77)
This commit is contained in:
committed by
Vitaly Provodin
parent
efa74fc5bf
commit
83c9e70a81
@@ -4,7 +4,7 @@ import sun.font.FontUtilities;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.InvocationEvent;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.Map;
|
||||
@@ -182,7 +182,7 @@ public class AWTThreading {
|
||||
// - guarantees a single run either from dispatch or dispose
|
||||
// - removes the invocation event from the tracking queue
|
||||
new Runnable() {
|
||||
SoftReference<TrackingQueue> queueRef = new SoftReference<>(queue);
|
||||
WeakReference<TrackingQueue> queueRef = new WeakReference<>(queue);
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -193,7 +193,6 @@ public class AWTThreading {
|
||||
TrackingQueue q = queueRef.get();
|
||||
if (q != null) {
|
||||
q.remove(eventRef[0]);
|
||||
q.clear();
|
||||
}
|
||||
queueRef = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user