diff options
author | Adam Domurad <[email protected]> | 2013-01-15 14:34:47 -0500 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-01-15 14:34:47 -0500 |
commit | 37f676efc43b73f5a46c5f4fada4cf1f42da56a8 (patch) | |
tree | 51a9acb9410e1b0356a7a54b6c33ec45eb55059a /plugin/icedteanp/java/netscape/javascript/JSUtil.java | |
parent | 05fbe64d15224e9e651231f86694e33799d5d39f (diff) |
Fix for PR1198: JSObject passed incorrectly to Javascript
Diffstat (limited to 'plugin/icedteanp/java/netscape/javascript/JSUtil.java')
-rw-r--r-- | plugin/icedteanp/java/netscape/javascript/JSUtil.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/netscape/javascript/JSUtil.java b/plugin/icedteanp/java/netscape/javascript/JSUtil.java index 14dfda0..8e841fc 100644 --- a/plugin/icedteanp/java/netscape/javascript/JSUtil.java +++ b/plugin/icedteanp/java/netscape/javascript/JSUtil.java @@ -57,4 +57,16 @@ public class JSUtil { return captureStream.toString(); } -} + + /** + * Uses package-private method JSObject.getInternalReference. + * This is package-private to avoid polluting the public interface. + * @param js JSObject to unbox + * @return the internal reference stored by the JSObject + */ + public static long getJSObjectInternalReference(JSObject js) { + // NB: permission is checked in JSObject + return js.getInternalReference(); + } + +}
\ No newline at end of file |