Closed
Bug 903273
Opened 11 years ago
Closed 11 years ago
[Session Restore] Use strict mode
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 26
People
(Reporter: ttaubert, Assigned: ttaubert)
Details
Attachments
(1 file)
6.15 KB,
patch
|
smacleod
:
review+
|
Details | Diff | Splinter Review |
Strict mode FTW. That should help us catch silly mistakes a little earlier.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #787955 -
Flags: review?(smacleod)
Updated•11 years ago
|
Attachment #787955 -
Flags: review?(smacleod) → review+
Assignee | ||
Comment 2•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/742a0082788f
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/742a0082788f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment 4•11 years ago
|
||
Comment on attachment 787955 [details] [diff] [review] Use strict mode in SessionStore files Review of attachment 787955 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/sessionstore/src/SessionStore.jsm @@ +881,5 @@ > + aWindow.removeEventListener("load", onload); > + this.onLoad(aWindow); > + }; > + > + aWindow.addEventListener("load", onload); Just fyi: this can also be aWindow.addEventListener("load", function onload(aEvent) { // ^^^^^^ aWindow.removeEventListener("load", onload); // ... }
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to :Ms2ger from comment #4) > Just fyi: this can also be > > aWindow.addEventListener("load", function onload(aEvent) { > // ^^^^^^ > aWindow.removeEventListener("load", onload); > // ... > } Well then I'd either have to '.bind(this)' and save that to a variable or do a 'let self = this' and call self.onLoad().
You need to log in
before you can comment on or make changes to this bug.
Description
•