提交 4f65cdb6 编写于 作者: P pchelko

8028285: RMI Thread can no longer call out to AWT

Reviewed-by: art, serb, ddehaven
上级 28e8bc14
......@@ -329,6 +329,20 @@ public final class AppContext {
while (context == null) {
threadGroup = threadGroup.getParent();
if (threadGroup == null) {
// We've got up to the root thread group and did not find an AppContext
// Try to get it from the security manager
SecurityManager securityManager = System.getSecurityManager();
if (securityManager != null) {
ThreadGroup smThreadGroup = securityManager.getThreadGroup();
if (smThreadGroup != null) {
/*
* If we get this far then it's likely that
* the ThreadGroup does not actually belong
* to the applet, so do not cache it.
*/
return threadGroup2appContext.get(smThreadGroup);
}
}
return null;
}
context = threadGroup2appContext.get(threadGroup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册