Closed
Bug 630851
Opened 14 years ago
Closed 14 years ago
Video doesn't work properly
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tech Evangelism Graveyard
English US
Tracking
(blocking2.0 -)
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: Eddwardiq, Unassigned)
References
()
Details
Attachments
(1 file)
2.54 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b11pre) Gecko/20110201 Firefox/4.0b11pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b11pre) Gecko/20110201 Firefox/4.0b11pre
Regression windows (really very old)
Works:
http://hg.mozilla.org/mozilla-central/rev/b7f3c1c9fb57
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091201 Minefield/3.7a1pre
Fails:
http://hg.mozilla.org/mozilla-central/rev/a5e1b195ecf7
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091202 Minefield/3.7a1pre
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b7f3c1c9fb57&tochange=a5e1b195ecf7
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.news.com.au/breaking-news/floodrelief/north-queensland-braces-for-cyclone-anthony-as-cyclone-yasi-brews-behind-it/story-fn7ik2te-1225998711771
Actual Results:
You can see only black box.
Expected Results:
Video should work properly.
Reporter | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Reporter | ||
Updated•14 years ago
|
Product: Firefox → Core
Version: unspecified → Trunk
Comment 1•14 years ago
|
||
The regression range is accurate. Confirming issue
Mozilla/5.0 (Windows NT 6.1; rv:2.0b11pre) Gecko/20110201
Firefox/4.0b11pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 2•14 years ago
|
||
The same problem and regression range here http://konfigurator.audi.de/entry
Comment 3•14 years ago
|
||
Error: in strict mode code, functions may be declared only at top level or immediately within another function
Source File: http://w.news-static.com/v/vcms-00164/js/vcms-min.js
Line: 1, Column: 11688
Source Code:
"use strict";(function(c){if(typeof c===undefined||c!==window.jQuery)...etc
I'm getting really nervous about strict mode breaking sites.
Assignee: nobody → general
Component: General → JavaScript Engine
QA Contact: general → general
![]() |
||
Comment 4•14 years ago
|
||
Dupe of Bug 607188 (already TE flagged).
![]() |
||
Comment 5•14 years ago
|
||
It's not quite a dup, since this is a new strict-mode restriction we added. One which it seems audi.de also hits, while it doesn't hit the other one...
In the news.com.au case, the relevant function is |function W(X)| in case it matters.
![]() |
||
Comment 6•14 years ago
|
||
At the very least, we'd need to file an evang bug on audi....
Comment 7•14 years ago
|
||
Please file a TE bug on Audi.
Cc'ing Oliver to confirm that JSC in WebKit nightlies and forthcoming Safari releases also reject function-declarations-in-blocks in strict mode.
/be
Comment 8•14 years ago
|
||
jsbeautifier.org'ed code excerpt:
if (!L) {
V = Q > 0 && b(function () {
G(z)
}, Q);
I = function () {
V && clearTimeout(V);
U[j] = U[p] = U[a] = U[q] = null;
f[A](U);
T && f[A](T)
};
window[S] = u;
U = e(g)[0];
U.id = s + k++;
if (J) {
U[t] = J
}
function W(X) {
(U[p] || d)();
X = c;
c = undefined;
X ? O(X[0]) : G(B)
}
if (y.msie) {
U.event = p;
U.htmlFor = U.id;
U[j] = function () {
U.readyState == "loaded" && W();
U.readyState == "complete" && W()
}
} else {
U[q] = U[a] = W;
y.opera ? ((T = e(g)[0]).text = "jQuery('#" + U.id + "')[0]." + q + "()") : U[o] = o
}
U.src = E;
n(U);
T && n(T)
}
No other uses of W in the code. This bug is worth reconsidering as not a TE issue, although it is always a mistake to slap "use strict" at the top of JS without testing in an ES5-conformant engine.
The reason to reconsider this bug is that the above code is Harmonious. In Harmony, function W will be block-scoped, hoisted. Its uses are all in scope. So if we could determine this and let it pass without a strict error, that would be better.
/be
Assignee: general → brendan
Comment 9•14 years ago
|
||
(In reply to comment #7)
> Please file a TE bug on Audi.
>
> Cc'ing Oliver to confirm that JSC in WebKit nightlies and forthcoming Safari
> releases also reject function-declarations-in-blocks in strict mode.
>
> /be
function f(){ "use strict"; { function g(){} } } won't parse in JSC (which i believe is what you're asking about )
Comment 10•14 years ago
|
||
(In reply to comment #4)
> Dupe of Bug 607188 (already TE flagged).
Is this some minified video-playing JS library that had a "use strict"; slapped on it without testing? If so, can we evangelize the library authors?
/be
Comment 11•14 years ago
|
||
I loaded the page in Epiphany, and the console there does show a syntax error. It also shows another script, tynt.js, which tries to create a global property non-explicitly. And looking at other scripts sent, it looks like every script is strict-moded. It seems the developer was just over-eager and applied it to everything in sight, without thought.
Comment 12•14 years ago
|
||
See bug 607188 comment 3.
/be
Comment 13•14 years ago
|
||
I contacted news.com.au about fixing their site; see the attachment for what I wrote.
Comment 14•14 years ago
|
||
Jeff: thanks for writing. If you correspond, or for future such messages, it would be good to ask about where the "use strict"; directives originated, to try to find a common upstream. Also you might mention Safari implementing strict mode (all those iP{ad,hone}s).
/be
Comment 15•14 years ago
|
||
This is likely going to morph into a TE bug assigned to Waldo (thanks to him for writing the site -- need more like that for Audi's site).
If we try to allow "Harmonious" block-contained function declarations but still use our conditional (dynamic) binding, we're not truly compatible. The binding is in the containing function or script's variable object AKA ES5's declarative environment (but not lexical!). It leaks past end of block into the rest of the function or script. It's not truly Harmonious.
I share bsmedberg's fear of "use script"; salt being thrown over developer shoulders without any testing (for want of an actual implemenetation of ES5 strict mode). But we are not going to create strict-quirks-mode! We need to evangelize.
This is risky and it is why I advocate mentioning Safari. Firefox 4 does not have much market share, and a busy or less enlightened hostmaster (assuming there is a human reading the mail we send) may blow off just some too-technical note from Firefox developers.
We need to fire hard, since IE (all versions including 9) "work" by ignoring "use strict", and so of course do all other browsers that don't implement ES5 strict mode.
Waldo hit on the right target on IRC: ES5 should have added new syntax here, not made runtime-incompatible, same-syntax changes via a seemingly useless string constant expression statement.
/be
OS: Windows 7 → All
Hardware: x86 → All
Comment 16•14 years ago
|
||
I filed bug 631043 on the Audi site failure, so that I have a narrowly-focused bug to mention when reporting the problem to Audi. (I'm working on writing something right now, to send to them via their contact form. However, whether I'll eventually hand off the task to someone else with less rusty German is an open question.)
Comment 17•14 years ago
|
||
Should we dup this to bug 607188? Could forward-dup that to this, or leave separate for the function-in-block angle here, as bz noted.
As for both bugs resulting in mail to the site, great. More the merrier.
/be
Assignee: brendan → english-other
Component: JavaScript Engine → English Other
Product: Core → Tech Evangelism
QA Contact: general → english-other
Version: Trunk → unspecified
Comment 18•14 years ago
|
||
I think I could manage to not warn about functions defined within blocks that are only used within that block, and after the definition (the FF/Harmony intersection). What's the priority?
Comment 19•14 years ago
|
||
Jim, that's what I was thinking of in comment 8 ("The reason to reconsider this bug...").
But see comment 15. Unless you are willing to make the binding static and block-scoped, we're not future-proof even if there are no later uses. In global code we can't tell, and the dynamic binding will live on in the global object. In function code there might be an eval, or even a hard to see dependency where the var is loop carried back into the block and "detected". 'let' != 'var'.
Fixing this right is bug 585536. Please feel free to steal from me. Would be good to get this fixed right after Firefox 4, for the next quarterly release.
/be
Comment 20•14 years ago
|
||
Taken.
Updated•14 years ago
|
Assignee: english-other → nobody
Component: English Other → General
Product: Tech Evangelism → Core
QA Contact: english-other → general
Updated•14 years ago
|
blocking2.0: ? → -
Updated•14 years ago
|
Assignee: nobody → english-us
Component: General → English US
Product: Core → Tech Evangelism
QA Contact: general → english-us
Comment 21•14 years ago
|
||
This is sill a problem at http://video.news.com.au/ under Firefox 4 RC1
Reporter | ||
Comment 22•14 years ago
|
||
WFM.
Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•