Closed Bug 825745 Opened 12 years ago Closed 12 years ago

Allow content to access indexed properties of array from chrome

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sinker, Unassigned)

Details

Attachments

(1 file)

Content can not access indexed properties of an array if it is returned as jsval from an XPCOM component wrote in JS.
Should we always allow access to indexed properties of arrays?
Comment on attachment 696875 [details] [diff] [review] Expose indexed properties of js array to content This patch doesn't make sense. JS_HasPropertyById only returns false if it throws. The |found| outparam is what indicates whether the property exists, and the current code waits to check |found| until after checked for indexed access. Regardless, the use case you're describing should work. Can you post a testcase demonstrating the problem. Does this patch fix things for you? If so, then presumably JS_HasPropertyById is throwing, and we should figure out why.
Attachment #696875 - Flags: review-
I'm going to mark this as INCOMPLETE. Thinker, if you have a chance to post the testcase that was at fault here, please do so and we can reopen.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: