Closed Bug 1173857 Opened 9 years ago Closed 9 years ago

Tabs are sometimes restored with invalid proxy state

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

STR:

0) Have automatic session restore enabled.
1) Have a window with two tabs.
2) Select the first tab.
3) Quit/Start Firefox two times.
4) Select the second tab.

The globe/TLS icon should be clickable but is instead greyed out.
We must not collect .userTypedValue from pending tabs. If it's already in the tabData that's fine.
Attachment #8621076 - Flags: review?(wmccloskey)
Keywords: regression
Hmm, I thought we had code to cover this. Why isn't this working?
https://dxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/SessionStore.jsm#2896

It looks like we eventually clear tabData.userTypedValue, but only after we fill in browser.userTypedValue. And by that time there's no reason to avoid collecting browser.userTypedValue.
Attachment #8621076 - Flags: review?(wmccloskey)
(In reply to Bill McCloskey (:billm) from comment #2)
> Hmm, I thought we had code to cover this.

Yes, you're right. I forgot about this it seems, sorry for that.

> It looks like we eventually clear tabData.userTypedValue, but only after we
> fill in browser.userTypedValue. And by that time there's no reason to avoid
> collecting browser.userTypedValue.

We do fill in userTypedValue but we always do that, even if the user didn't modify the URL in the location bar - this is some wallpaper fix from ages ago. On "restoreTabContentStarted" we set the userTypedValue again if needed and only now we can clear the cached value and start to collect it.
TabStateCache.set() already handles |null| values and deletes entries accordingly. TabState.copyFrameCache() shouldn't check for |if (value)| because the cache already did that and we'll treat |0| and |""| as non-values too.
Attachment #8621076 - Attachment is obsolete: true
Attachment #8622370 - Flags: review?(wmccloskey)
The only test that broke was browser_attributes.js. Turns out that although TabAttributes.jsm should ignore internal attributes it checks for exactly the wrong behavior (my fault I guess). Fixed the test and TabAttributes.set() to correctly ignore internal attributes.
Attachment #8622372 - Flags: review?(wmccloskey)
Attachment #8622370 - Flags: review?(wmccloskey) → review+
Attachment #8622372 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/b148ba60f686
https://hg.mozilla.org/mozilla-central/rev/5ab32a115a62
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: