Last Comment Bug 746221 - browser_webconsole_bug_651501_document_body_autocomplete.js fails with compartment-per-global
: browser_webconsole_bug_651501_document_body_autocomplete.js fails with compar...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 14
Assigned To: Bobby Holley (:bholley) (busy with Stylo)
:
Mentors:
Depends on:
Blocks: cpg
  Show dependency treegraph
 
Reported: 2012-04-17 10:31 PDT by Bobby Holley (:bholley) (busy with Stylo)
Modified: 2012-04-18 13:23 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Pull properties for comparison off the prototype to avoid mismatches with expandos. v1 (2.09 KB, patch)
2012-04-17 10:34 PDT, Bobby Holley (:bholley) (busy with Stylo)
past: review+
Details | Diff | Splinter Review

Description Bobby Holley (:bholley) (busy with Stylo) 2012-04-17 10:31:34 PDT
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.
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2012-04-17 10:34:44 PDT
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.
Comment 2 Panos Astithas [:past] 2012-04-18 01:04:14 PDT
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.
Comment 3 Bobby Holley (:bholley) (busy with Stylo) 2012-04-18 01:10:25 PDT
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/c209b10216fb
Comment 4 Bobby Holley (:bholley) (busy with Stylo) 2012-04-18 01:12:36 PDT
(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.

Note You need to log in before you can comment on or make changes to this bug.