Closed Bug 204765 Opened 21 years ago Closed 21 years ago

Parameterized properties expression don't return the assigned value

Categories

(Core :: XPConnect, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.5alpha

People

(Reporter: dbradley, Assigned: dbradley)

References

Details

Attachments

(1 file)

When assigning a parameterized property the result of the expression is
undefined. It should be the value that was assigned.

Example:
typeof (obj.parameterizedProperty(5) = 50);

returns "undefined"

I don't think this is critical problem. We haven't encountered this pattern, but
I wanted to record the anomoly so it can be fixed for 1.5. I'm not sure if the
problem lies in XPConnect or JS, my bet is XPConnect at this point.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.5alpha
This returns back the property value when an assignment occurs.
Comment on attachment 125751 [details] [diff] [review]
Returns the proper value on assignment of a property

Looking for reviews for this patch. This addresses the property assignment not
"returning" the value assigned. It saves off the  the incoming JSVal, makes
sure it doesn't get collected and then puts it back into vp. The invoke that
occurs is generic and puts the result in vp. In this case IDispatch returns
nothing for assigning a property. So this is why we need to save off the value
and assign it on our way out.
Attachment #125751 - Flags: superreview?(alecf)
Attachment #125751 - Flags: review?(adamlock)
Comment on attachment 125751 [details] [diff] [review]
Returns the proper value on assignment of a property

r=adamlock
Attachment #125751 - Flags: review?(adamlock) → review+
Comment on attachment 125751 [details] [diff] [review]
Returns the proper value on assignment of a property

sr=alecf
Attachment #125751 - Flags: superreview?(alecf) → superreview+
Patch checked into trunk. Leaving open for possible consideration of the 1.4
branch later.
Closing to get off 1.5a radar, though these should still be checked into 1.4 branch.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Blocks: 212096
Rubber-stamp vrfy
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: