Closed Bug 310068 Opened 19 years ago Closed 19 years ago

XPCNativeWrapper fails to look up named properties on HTMLCollection

Categories

(Core :: XPConnect, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: ma1, Assigned: peterv)

References

Details

Attachments

(1 file)

Creating XPCNativeWrapper (either deep or shallow) on a HTMLConnection returns an object with no length property. Steps to reproduce: 1. Open a web page 2. Open the JavaScript Console 3. Evaluate this script: alert(new top.opener.XPCNativeWrapper(top.opener.content.document.getElementsByTagName("a"),"length").length) Expected result: a number is displayed Actual result: "undefined" is displayed
This is a regression from bug 296230. Note that the patch for bug 310069 might "fix" this, but the code here is still wrong. We should only be returning I_DID_SOMETHING if we actually got something, and in this case we haven't... That is, put the setting of rv back where it was before the patch for bug 296230.
Blocks: 296230
Flags: blocking1.9a1+
Summary: XPCNativeWrapper fails to wrapp HTMLCollection → XPCNativeWrapper fails to look up named properties on HTMLCollection
Blocks: 310115
*** Bug 310115 has been marked as a duplicate of this bug. ***
Attached patch v1 (deleted) — Splinter Review
Attachment #197556 - Flags: superreview?(bzbarsky)
Attachment #197556 - Flags: review?(bzbarsky)
Attachment #197556 - Flags: superreview?(bzbarsky)
Attachment #197556 - Flags: superreview+
Attachment #197556 - Flags: review?(bzbarsky)
Attachment #197556 - Flags: review+
Status: NEW → RESOLVED
Closed: 19 years ago
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: