Fix a typo in nsSessionStore.js

RESOLVED FIXED in Firefox 8

Status

()

Firefox
Session Restore
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: ithinc, Assigned: ithinc)

Tracking

Trunk
Firefox 8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

1.33 KB, patch
zpao
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)

browser.loadURI(tabData.userTypedValue, null, null, true) is a wrong call.

For browser, we have APIs:
function loadURI(aURI, aReferrerURI, aCharset)
function loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData)

For tabbrowser, we have APIs:
function loadURI(uri, referrer, postData, allowThirdPartyFixup)

Reproducible: Always
(Assignee)

Updated

7 years ago
Version: unspecified → Trunk
(Assignee)

Comment 1

7 years ago
http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#2703
Version: Trunk → unspecified
True. It's not going to be harmful passing an extra param, but might as well fix it.

Hmm, actually we might want to have this do the same thing as loadURI from browser.js and call loadURIWithFlags directly so that we get the third party fixup flag set.
(Assignee)

Updated

6 years ago
Version: unspecified → Trunk
(Assignee)

Comment 3

6 years ago
Yes, please set the third party fixup flag.
(Assignee)

Comment 4

6 years ago
Created attachment 536842 [details] [diff] [review]
patch
Attachment #536842 - Flags: review?(paul)
(Assignee)

Comment 5

6 years ago
Created attachment 536844 [details] [diff] [review]
patch v2
Attachment #536842 - Attachment is obsolete: true
Attachment #536844 - Flags: review?(paul)
Attachment #536842 - Flags: review?(paul)
Comment on attachment 536844 [details] [diff] [review]
patch v2

>diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js
>--- a/browser/components/sessionstore/src/nsSessionStore.js
>+++ b/browser/components/sessionstore/src/nsSessionStore.js
>@@ -2911,18 +2911,21 @@ SessionStoreService.prototype = {
>     if (tabData.userTypedValue) {
>       browser.userTypedValue = tabData.userTypedValue;
>       if (tabData.userTypedClear) {
>         // Make it so that we'll enter restoreDocument on page load. We will
>         // fire SSTabRestored from there. We don't have any form data to restore
>         // so we can just set the URL to null.
>         browser.__SS_restore_data = { url: null };
>         browser.__SS_restore_tab = aTab;
>+        if (didStartLoad)
>+          browser.stop();

I guess it doesn't hurt, but is there any particular reason you're calling stop here?
(Assignee)

Comment 7

6 years ago
Parallel loading might lead to some abnormality? I'm not sure, but I read that we often stop "about:blank" loading.
Attachment #536844 - Flags: review?(paul) → review+
ithinc - do you have a name you'd rather have in the commit message or is ithinc ok?
http://hg.mozilla.org/integration/fx-team/rev/ca686ff1621f
Assignee: nobody → ithinc
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: [fixed-in-fx-team]
http://hg.mozilla.org/mozilla-central/rev/ca686ff1621f
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 8

Updated

6 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.