browser_webconsole_bug_651501_document_body_autocomplete.js fails with compartment-per-global

RESOLVED FIXED in Firefox 14

Status

()

Firefox
Developer Tools: Console
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
Firefox 14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The test asserts that the number of properties on the object is the same as number of rows in the treeview. This breaks if the content object has any expandos in it, since the expandos are only visible in the compartment that created them. In this case, the 'constructor' expando is resolved and defined by nsDOMClassInfo on content.document, but it isn't visible in PropertyPanel.jsm.

Patch coming right up. This patch also checks for properties individually, so that it's easier to see what went wrong if there's every a discrepancy.
Created attachment 615777 [details] [diff] [review]
Pull properties for comparison off the prototype to avoid mismatches with expandos. v1

Attaching a patch, flagging past for review.
Attachment #615777 - Flags: review?(past)
Comment on attachment 615777 [details] [diff] [review]
Pull properties for comparison off the prototype to avoid mismatches with expandos. v1

Review of attachment 615777 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, the count comparison was something I always wanted to come back and improve. However I am wondering if we need to change our approach here to get expandos to appear in the property view, somehow.
Attachment #615777 - Flags: review?(past) → review+
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/c209b10216fb
(In reply to Panos Astithas [:past] from comment #2)
> However I am wondering if we need to change our approach here to
> get expandos to appear in the property view, somehow.

I can't think of a great way to do this, offhand. The basic issue is that each chrome scope gets its own clean Xray view of content DOM objects. So if the expandos are private to the compartment that created them, there's no great way to share them with JSMs and such.
Target Milestone: --- → Firefox 14
https://hg.mozilla.org/mozilla-central/rev/c209b10216fb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.