Mercurial > hg > release > icedtea6-1.3
view plugin/icedtea/sun/applet/AppletSecurityContextManager.java @ 1066:358cb21c4730
More refactoring -- the last big one in the forseeable future.
Implemented proper sandbox for liveconnect calls.
Added error detection in the plugin, so it doesn't loop forever if Java side
encounters an error.
author | Deepak Bhole <dbhole@redhat.com> |
---|---|
date | Wed, 01 Oct 2008 16:40:56 -0400 |
parents | abdb5c94757d |
children | 86fbcf148d1f |
line wrap: on
line source
package sun.applet; import java.util.HashMap; public class AppletSecurityContextManager { // Context identifier -> PluginAppletSecurityContext object. // FIXME: make private private static HashMap<Integer, PluginAppletSecurityContext> contexts = new HashMap(); public static void addContext(int identifier, PluginAppletSecurityContext context) { contexts.put(identifier, context); } public static PluginAppletSecurityContext getSecurityContext(int identifier) { return contexts.get(identifier); } public static void dumpStore(int identifier) { contexts.get(identifier).dumpStore(); } public static void handleMessage(int identifier, String src, int reference, String message) { System.err.println(identifier + " -- " + src + " -- " + reference + " -- " + message + " CONTEXT= " + contexts.get(identifier)); contexts.get(identifier).handleMessage(src, reference, message); } }