Closed
Bug 610017
Opened 15 years ago
Closed 13 years ago
_isCmdLineEmpty should not clobber window.arguments[0]
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 18
People
(Reporter: Gavin, Assigned: mkohler)
Details
Attachments
(1 file, 2 obsolete files)
1.54 KB,
patch
|
ttaubert
:
review+
|
Details | Diff | Splinter Review |
It's unexpected that this method would have side-effects, and it doesn't seem to serve a purpose, since by the time this code has run (triggered via delayedStartup), the argument will have already been handled by the window's onload handler.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → michaelkohler
Status: NEW → ASSIGNED
Attachment #645688 -
Flags: review?(ttaubert)
Comment 2•13 years ago
|
||
Comment on attachment 645688 [details] [diff] [review]
Patch v1
Review of attachment 645688 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you for tackling this, Michael.
Unfortunately we can't just remove the second argument and the local 'pinnedOnly' variable. We still need this as "aWindow.arguments[0]" affects the return value. We just shouldn't modify "aWindow.arguments" but rather save this to a local variable.
Attachment #645688 -
Flags: review?(ttaubert) → review-
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #645688 -
Attachment is obsolete: true
Attachment #645789 -
Flags: review?(ttaubert)
Comment 4•13 years ago
|
||
Comment on attachment 645789 [details] [diff] [review]
Patch v2
Review of attachment 645789 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/sessionstore/src/SessionStore.jsm
@@ +3889,5 @@
>
> if (!pinnedOnly) {
> let defaultArgs = Cc["@mozilla.org/browser/clh;1"].
> getService(Ci.nsIBrowserHandler).defaultArgs;
> + var windowArguments = aWindow.arguments;
Nit: please use 'let' for variable definitions. Let is the new var!
The actual problem here is that windowArguments does now contain a reference to aWindow.arguments. Modifying windowArguments[0] is therefore the same as modifying aWindow.arguments[0].
Attachment #645789 -
Flags: review?(ttaubert)
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #645789 -
Attachment is obsolete: true
Attachment #646548 -
Flags: review?(ttaubert)
Comment 6•13 years ago
|
||
Comment on attachment 646548 [details] [diff] [review]
Patch v3
Review of attachment 646548 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks Michael, great work!
Attachment #646548 -
Flags: review?(ttaubert) → review+
Comment 8•13 years ago
|
||
(Remarkably) Green on Try.
https://tbpl.mozilla.org/?tree=Try&rev=cf7f719d7f47
https://hg.mozilla.org/integration/mozilla-inbound/rev/ebc0ba34959d
Flags: in-testsuite-
Keywords: checkin-needed
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
You need to log in
before you can comment on or make changes to this bug.
Description
•