Closed Bug 746221 Opened 8 years ago Closed 8 years ago

browser_webconsole_bug_651501_document_body_autocomplete.js fails with compartment-per-global

Categories

(DevTools :: Console, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 14

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(1 file)

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.
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+
(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
Closed: 8 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.