Closed
Bug 903273
Opened 12 years ago
Closed 12 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•12 years ago
|
||
Attachment #787955 -
Flags: review?(smacleod)
Updated•12 years ago
|
Attachment #787955 -
Flags: review?(smacleod) → review+
| Assignee | ||
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment 4•12 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•12 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
•