equal
deleted
inserted
replaced
456 |
456 |
457 SecurityManager sm = System.getSecurityManager(); |
457 SecurityManager sm = System.getSecurityManager(); |
458 JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess(); |
458 JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess(); |
459 if (sm != null && javaAwtAccess != null) { |
459 if (sm != null && javaAwtAccess != null) { |
460 // for each applet, it has its own LoggerContext isolated from others |
460 // for each applet, it has its own LoggerContext isolated from others |
461 synchronized (javaAwtAccess) { |
461 final Object ecx = javaAwtAccess.getAppletContext(); |
462 // find the AppContext of the applet code |
462 if (ecx != null) { |
463 // will be null if we are in the main app context. |
463 synchronized (javaAwtAccess) { |
464 final Object ecx = javaAwtAccess.getAppletContext(); |
464 // find the AppContext of the applet code |
465 if (ecx != null) { |
465 // will be null if we are in the main app context. |
466 if (contextsMap == null) { |
466 if (contextsMap == null) { |
467 contextsMap = new WeakHashMap<>(); |
467 contextsMap = new WeakHashMap<>(); |
468 } |
468 } |
469 context = contextsMap.get(ecx); |
469 context = contextsMap.get(ecx); |
470 if (context == null) { |
470 if (context == null) { |