Last Comment Bug 668646 - Invalid cookie hosts causes sessionstore to stop updating
: Invalid cookie hosts causes sessionstore to stop updating
Status: VERIFIED FIXED
[qa!]
: verified-aurora, verified-beta
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 8
Assigned To: Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
:
Mentors:
: 661481 (view as bug list)
Depends on:
Blocks: 671520
  Show dependency treegraph
 
Reported: 2011-06-30 14:55 PDT by Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
Modified: 2015-10-07 18:37 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Patch v0.1 (3.98 KB, patch)
2011-06-30 15:02 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
dietrich: review+
asa: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-30 14:55:36 PDT
This is possibly the same cause as bug 601739, but it's a different error, so filing it separately.

Error: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsICookieManager2.getCookiesFromHost]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource:///components/nsSessionStore.js :: <TOP_LEVEL> :: line 2205"  data: no]
Source File: resource:///components/nsSessionStore.js
Line: 2205

STR:
1. Go to www..emacs (this happened to be how I repro'd)
2. Go anywhere

2 might not even be necessary.

I guess www..emacs is in session history and somehow being used to get hosts. That's not a real host, so cookie svc says no.

So I'm putting this up to 2 choices:
1. Fix our host regex
2. Just try-catch getCookiesFromHost, discarding bad hosts
Comment 1 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-30 15:02:07 PDT
Created attachment 543272 [details] [diff] [review]
Patch v0.1

Took approach 2
Comment 2 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-07-01 11:56:55 PDT
I looked at replacing the regexp with getting the scheme & host from the nsIURI, but that doesn't actually help. uri.host will still give www..emacs and we'd need to try-catch anyway.

(I'm thinking it might be good to use nsIURI in _serializeHistoryEntry and grabbing scheme & host there instead of execing regexps a lot and then creating an nsIURI for most of those anyway... filed bug 668865)
Comment 3 Dietrich Ayala (:dietrich) 2011-07-08 08:00:01 PDT
Comment on attachment 543272 [details] [diff] [review]
Patch v0.1

Review of attachment 543272 [details] [diff] [review]:
-----------------------------------------------------------------

if possible, would like to move the try/catch down closer to the bit that you know throws. r=me either way though.
Comment 4 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-07-11 15:39:46 PDT
Moved the try-catch closer to failure.

http://hg.mozilla.org/integration/fx-team/rev/10044a48f896
Comment 5 Tim Taubert [:ttaubert] 2011-07-13 15:27:09 PDT
http://hg.mozilla.org/mozilla-central/rev/10044a48f896
Comment 6 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-08-20 18:15:20 PDT
*** Bug 661481 has been marked as a duplicate of this bug. ***
Comment 7 Michael Kraft [:morac] 2011-08-20 21:15:13 PDT
Is there any way this could make it into the beta branch (Firefox 7)?
Comment 8 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-08-20 22:04:54 PDT
Comment on attachment 543272 [details] [diff] [review]
Patch v0.1

approval-beta? Safe patch that just wraps a potential error that causes session restore to stop saving state.
Comment 9 Cameron McCormack (:heycam) 2011-08-29 14:55:49 PDT
http://hg.mozilla.org/releases/mozilla-beta/rev/4d360d0794dc
Comment 10 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-22 15:41:58 PDT
qa+ for verification in Firefox 7
Comment 11 Mihaela Velimiroviciu (:mihaelav) 2011-09-23 06:32:39 PDT
WINDOWS:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a2) Gecko/20110914 Firefox/8.0a2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0

LINUX:
Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (X11; Linux x86_64; rv:8.0a2) Gecko/20110916 Firefox/8.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101 Firefox/7.0

MAC:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a2) Gecko/20110921 Firefox/8.0a2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0

Verified on Win7/64bit, Ubuntu/64bit, Mac 10.6
Steps:
1. Go to emacs.com
2. Go to www..emacs
3. Open Error Console
Result: Error not displayed in error console.
Comment 12 Mihaela Velimiroviciu (:mihaelav) 2011-09-23 07:18:08 PDT
Verified as fixed also on XP:
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0

Note You need to log in before you can comment on or make changes to this bug.