Closed Bug 466509 Opened 17 years ago Closed 7 years ago

Provide a way to prevent access to individual methods in NativeJavaObject

Categories

(Rhino Graveyard :: Core, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: kruland, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Build Identifier: 1_7R1 The Rhino NativeJavaObject wraps Java Objects and exposes all public methods to JavaScript. In some scenarios, certain methods should not be exposed. The Object.wait and Object.notify are particularly trouble some because they are public, final and can cause threading problems. In order to hide these methods from JavaScript, the developer of the embedding needs to write ScriptableObject wrappers for all Java objects. Reproducible: Always
This patch contains changes to the ClassShutter interface providing an entry developers can use to prevent individual member function from being exposed to JavaScript through the NativeJavaObject. JavaMembers was changed to call this method during the iteration over Member objects. It could be possible for this mechanism to be extended/enhanced to cover the Context.FEATURE_ENHANCED_JAVA_ACCESS functionality as well.

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: