Closed
Bug 673104
Opened 13 years ago
Closed 13 years ago
Use ES5 strict mode for Panorama
Categories
(Firefox Graveyard :: Panorama, defect)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 8
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file, 1 obsolete file)
15.56 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•13 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #547410 -
Flags: feedback?(raymond)
Comment 2•13 years ago
|
||
Comment on attachment 547410 [details] [diff] [review] patch v1 >--- a/browser/base/content/tabview/modules/utils.jsm >+++ b/browser/base/content/tabview/modules/utils.jsm >+ function tanh(x) { >+ var e = Math.exp(x); >+ return (e - 1/e) / (e + 1/e); >+ } >+ > if (smooth) { > // The ease function ".5+.5*Math.tanh(4*x-2)" is a pretty > // little graph. It goes from near 0 at x=0 to near 1 at x=1 > // smoothly and beautifully. > // http://www.wolframalpha.com/input/?i=.5+%2B+.5+*+tanh%28%284+*+x%29+-+2%29 >- function tanh(x) { >- var e = Math.exp(x); >- return (e - 1/e) / (e + 1/e); >- } > return .5 - .5 * tanh(2 - 4 * proportion); > } >--- a/browser/base/content/tabview/search.js >+++ b/browser/base/content/tabview/search.js >+ function dispatchTabViewSearchEnabledEvent() { >+ let newEvent = document.createEvent("Events"); >+ newEvent.initEvent("tabviewsearchenabled", false, false); >+ dispatchEvent(newEvent); >+ } >+ > if (!isSearchEnabled()) { > $searchShade.show(); > $search.show(); > > #ifdef XP_MACOSX > UI.setTitlebarColors({active: "#717171", inactive: "#EDEDED"}); > #endif > > // NOTE: when this function is called by keydown handler, next keypress > // event or composition events of IME will be fired on the focused editor. >- >- function dispatchTabViewSearchEnabledEvent() { >- let newEvent = document.createEvent("Events"); >- newEvent.initEvent("tabviewsearchenabled", false, false); >- dispatchEvent(newEvent); >- }; That's annoying. What rule enforces this?
Assignee | ||
Comment 3•13 years ago
|
||
This one: http://whereswalden.com/2011/01/24/new-es5-strict-mode-requirement-function-statements-not-at-top-level-of-a-program-or-function-are-prohibited/
Comment 4•13 years ago
|
||
Again, annoying. Does let foo = function ... work?
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to comment #4) > Again, annoying. Does let foo = function ... work? Yep, it does.
Attachment #547410 -
Attachment is obsolete: true
Attachment #547523 -
Flags: feedback?(raymond)
Attachment #547410 -
Flags: feedback?(raymond)
Assignee | ||
Updated•13 years ago
|
Attachment #547523 -
Flags: feedback?(raymond) → review?(dao)
Comment 6•13 years ago
|
||
Comment on attachment 547523 [details] [diff] [review] patch v2 > function observer(subject, topic, data) { > switch (topic) { > case "domwindowopened": >- subject.addEventListener("load", function() { >- subject.removeEventListener("load", arguments.callee, false); >+ subject.addEventListener("load", function onLoad() { >+ subject.removeEventListener("load", onLoad, false); I wonder where this makes onLoad available, exactly, and why this doesn't bother strict mode.
Attachment #547523 -
Flags: review?(dao) → review+
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to comment #6) > I wonder where this makes onLoad available, exactly, and why this doesn't > bother strict mode. In this case it's a function expression (not a function definition) and so the name of it is bound locally inside the function, but not outside.
Assignee | ||
Comment 8•13 years ago
|
||
http://hg.mozilla.org/integration/fx-team/rev/f79f1ea87e2c
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Comment 9•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/f79f1ea87e2c
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → Firefox 8
Updated•8 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•