Revisit the new LiveConnect security implementation and add support for correctly granting permissions. During JavaScript-to-Java calls, the JavaScript code should effectively be treated as an unsigned applet originating from the document base, and receive permission to connect back to the host from which the HTML document came. Unsigned Java applets should receive permission to connect to the code base as usual. If the applet is unsigned, and the document base is not the same as the code base, the intersection of these permissions should imply that JavaScript-to-Java calls should not be able to connect to any host on the network. Currently the code grants permissions to connect to the code base and ignores the document base for calls originating from JavaScript, which is not correct.