Closed Bug 539875 Opened 15 years ago Closed 6 years ago

Delegator incompatible with host objects with functions

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: djgredler, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) Build Identifier: trunk When you use a Delegator to wrap a Java host object, any call to a jsFunction_XXX method defined in the host object results in an error. The problem is that FunctionObject checks to make sure that the "this" object in question is a valid target for the method call, but doesn't know to unwrap "this" into the Delegator's delegee. Patch (including unit test) attached. Reproducible: Always
Attached patch proposed patch (obsolete) — Splinter Review
Attached patch second patchSplinter Review
Actually, it appears that the delegator + host object combination is not really supported out of the box at all. I'm attaching a second patch which expands the unit tests and shows that there are issues with jsGet_... and jsSet_... methods and delegators as well. I haven't included a fix for these extra scenarios in this patch, as I'm not sure where the unwrapping should go...
Attachment #421775 - Attachment is obsolete: true

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

Status: UNCONFIRMED → RESOLVED
Closed: 6 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: