Closed
Bug 1270364
Opened 9 years ago
Closed 8 years ago
MimeTypeArray should have unenumerable named properties per spec
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: addon-compat, dev-doc-complete, site-compat, Whiteboard: btpp-fixlater)
Attachments
(1 file)
(deleted),
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
It's not clear to me why the spec says this, though. They're certainly enumerable in Firefox... Anne, do you know?
Changing this could include some compat pain, unfortunately.
Flags: needinfo?(annevk)
Comment 1•9 years ago
|
||
You discussed this with Ian back in 2013: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22600 (found through grepping through the spec commit log for unenumerable).
Flags: needinfo?(annevk)
Updated•9 years ago
|
Whiteboard: btpp-fixlater
Assignee | ||
Comment 2•8 years ago
|
||
No tests, like bug 1270366, and for the same reasons: the tests would depend on plugins...
Attachment #8786587 -
Flags: review?(bkelly)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Updated•8 years ago
|
Attachment #8786587 -
Flags: review?(bkelly) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b319fc865ce5
MimeTypeArray should have unenumerable named properties per spec. r=bkelly
Comment 4•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
status-firefox50:
--- → affected
Updated•8 years ago
|
Assignee | ||
Comment 5•8 years ago
|
||
Backed out per bug 757726 comment 161 for now, until we kill off plugins and can make the change more safely.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Backout by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6819c6bc8508
Backed out changeset b319fc865ce5 per discussion in bug 757726 (starting somewhere around bug 757726 comment 157).
Comment 7•8 years ago
|
||
backout bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•8 years ago
|
||
No, the whole point is this is not fixed...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•8 years ago
|
Assignee | ||
Comment 9•8 years ago
|
||
Seems like I should only reland this once the pref from bug 1269807 goes away (and in particular, should not land this for esr52), right? Is there a bug tracking that pref being removed?
Flags: needinfo?(benjamin)
Comment 10•8 years ago
|
||
Posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/navigator-plugins-and-mimetypes-will-be-unenumerable/
Assignee | ||
Comment 11•8 years ago
|
||
I don't think this change will be happening for 52. See comment 9.
Flags: needinfo?(kohei.yoshino)
Comment 12•8 years ago
|
||
I guess this comes with 53, right? So the doc's version is "Future" for now.
Flags: needinfo?(kohei.yoshino)
Assignee | ||
Comment 13•8 years ago
|
||
> I guess this comes with 53, right?
So I assume.
Comment 14•8 years ago
|
||
What is the practical effect of this bug? Does this make navigator.mimeTypes not enumerable at all? Or is still possible to enumerate the *indexed* properties but not the named ones?
I filed bug 1308761 to track the ESR52-specific setting. There is not a specific bug for removing the rest of this goop in 53 yet, but I don't think that should block you.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 15•8 years ago
|
||
> Or is still possible to enumerate the *indexed* properties but not the named ones?
The practical effect is that a for-in loop on navigator.mimeTypes will only see the indexed properties and will not see the named ones. Object.getOwnPropertyNames will still see both.
I guess my question is whether I should land this now and we disable it on the ESR52 branch or whether I should just wait until m-c becomes 53 before landing.
Flags: needinfo?(benjamin)
Comment 16•8 years ago
|
||
This should wait for 53 please.
The behavior of Chrome is here is surprising to me, in that it enumerates the indexed properties as well as "length", "item", and "namedItem". I hope that this change won't affect web compat in the following manner:
var foundFlash = false;
for (var k in navigator.mimeTypes) {
if (k == "application/x-shockwave-flash") {
foundFlash = true;
}
}
Because people do a lot of weird stuff on the internet.
Is this a valuable change to make? Could we get away with not making any change here at all? Spec be damned and being risk-averse on purpose.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 17•8 years ago
|
||
> This should wait for 53 please.
Will do.
> The behavior of Chrome is here is surprising to me, in that it enumerates the indexed
> properties as well as "length", "item", and "namedItem".
That would be our behavior after this change too, fwiw.
> I hope that this change won't affect web compat in the following manner
That loop sets foundFlash to false in at least Chrome and Safari, right? I haven't tested Edge recently because I don't have access to Edge in an environment where Flash is installed.
> Is this a valuable change to make?
Not technically, but it's useful politically in terms of with getting other browsers to make other changes to align with specs and us.
> Could we get away with not making any change here at all?
We could, but if we did that I would prefer to get the spec changed accordingly and hence have to convince the other UAs to follow us...
Flags: needinfo?(bzbarsky)
Flags: needinfo?(benjamin)
Comment 18•8 years ago
|
||
We *know* that there's all kinds of webcompat issues here. I don't think we should ask Chrome to change their current behavior, because that might cause webcompat issues for them. I just don't see much value in changing our current behavior either. Until/unless we see webcompat issues because we're not doing the same thing as Chrome, the safer thing is to make as few changes to this legacy system as possible.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 19•8 years ago
|
||
OK, but that puts us in a pretty sad position where the spec is meaningless and costs both us and the WHATWG/W3C credibility. :(
I will wait for 52 to branch to Aurora and then carefully check exactly what other browsers do here, I guess. We could always opt for having the spec explicitly say that both behaviors are allowed if we think that minimizes risk....
Assignee | ||
Comment 20•8 years ago
|
||
OK. I have double-checked and all of Edge, Safari, Chrome agree here. We're the only ones that disagree.
I'm going to go ahead and land this after 52 branches.
Comment 21•8 years ago
|
||
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a28c54656b3
MimeTypeArray should have unenumerable named properties per spec. r=bkelly
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(bzbarsky)
Updated•8 years ago
|
status-firefox52:
--- → wontfix
status-firefox53:
--- → affected
Comment 22•8 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Comment 23•8 years ago
|
||
I've added notes to:
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/mimeTypes
https://developer.mozilla.org/en-US/Firefox/Releases/53#DOM_HTML_DOM
(We never actually created a page for MimeTypeArray)
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•