Closed Bug 866222 Opened 7 years ago Closed 6 years ago

Always or never define getInterface on the global

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed
firefox30 --- fixed
b2g-v1.3 --- fixed
b2g-v1.4 --- fixed

People

(Reporter: evilpie, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

(Keywords: site-compat)

Attachments

(1 file)

We seem to not consistently have the getInterface on the global this. This causes issues with some test262, that compare the result of two consecutive for ... in over the global object. 

Testcase: http://jsfiddle.net/sKYa6/1/ 
For some reason this doesn't always reproduce for me. My own build shows the problem, but the nightly I am using, does not.
I say we just add nsIInterfaceRequestor to window classinfo for now...
Component: XPConnect → DOM
What causes it to appear sometimes?  The Firefox UI QIing it?  Does that propagate through xrays?
> What causes it to appear sometimes?  The Firefox UI QIing it? 

Afaik, yes.

> Does that propagate through xrays?

Again, afaik yes.
I'll be glad when that goes away for DOM objects ;-)
I assume this is going to be fixed by webidl DOMWindow? Is that going to happen soon?
WebIDL window will get us "never", yes, for web content.

But it's not going to happen until a month or more from now at best; no one is actively workin on it.

For this bug, we could just add nsIInterfaceRequestor to the classinfo for window, I guess...
Depends on: 789261
Duplicate of this bug: 965790
This seems to be breaking actual web content (see bug 965790).  I think we should just add this to classinfo for the moment.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8368214 - Flags: review?(peterv) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f9e691162e6
Flags: in-testsuite?
Target Milestone: --- → mozilla30
Comment on attachment 8368214 [details] [diff] [review]
Just always define getInterface on the window for now, so we stop breaking people.  It'll go away once we ship WebIDL window.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Been with us for a while, but has
   recently started breaking sites.
User impact if declined: Some websites (e.g. Udacity) are broken in Firefox.
Testing completed (on m-c, etc.): Passes our tests.
Risk to taking this patch (and alternatives if risky): Risk should be low.  All
   this patch does is make the property always visible to the web page, instead
   of being either visible or not depending on what UI code happens to have run.
String or IDL/UUID changes made by this patch:  None.
Attachment #8368214 - Flags: approval-mozilla-beta?
Attachment #8368214 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/0f9e691162e6
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Attachment #8368214 - Flags: approval-mozilla-beta?
Attachment #8368214 - Flags: approval-mozilla-beta+
Attachment #8368214 - Flags: approval-mozilla-aurora?
Attachment #8368214 - Flags: approval-mozilla-aurora+
OS: Linux → All
Hardware: x86_64 → All
Cannot document this if we don't know when it started to happen.
Keywords: dev-doc-needed
I don't think this needs developer documentation.  It "started" to happen probably over a decade ago.
I re-enabled the test262 that this bug or WebIDL window should have fixed: https://hg.mozilla.org/integration/mozilla-inbound/rev/a67d187584ed
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.