Last Comment Bug 692078 - Second attempt to open addons.sqlite is doesn't work
: Second attempt to open addons.sqlite is doesn't work
Status: VERIFIED FIXED
[qa!]
:
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: 9 Branch
: All All
: -- normal (vote)
: mozilla10
Assigned To: Geoff Lankow (:darktrojan)
:
: Andy McKay [:andym]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-05 05:23 PDT by Geoff Lankow (:darktrojan)
Modified: 2011-11-24 08:00 PST (History)
9 users (show)
blair: in‑testsuite+
blair: in‑litmus-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
patch and test (4.70 KB, patch)
2011-10-05 05:23 PDT, Geoff Lankow (:darktrojan)
dtownsend: review+
Details | Diff | Splinter Review
patch using bind() (4.67 KB, patch)
2011-10-05 16:23 PDT, Geoff Lankow (:darktrojan)
dtownsend: review+
Details | Diff | Splinter Review
patch with proper commit message (4.73 KB, patch)
2011-10-07 04:44 PDT, Geoff Lankow (:darktrojan)
asa: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Geoff Lankow (:darktrojan) 2011-10-05 05:23:45 PDT
Created attachment 564801 [details] [diff] [review]
patch and test

When I added the test from bug 689375 to mozilla-central I discovered the code I refactored into the tryAgain function no longer works (|this| is undefined inside the function).

This patch includes said test.
Comment 1 Marco Bonardo [::mak] 2011-10-05 10:01:28 PDT
fwiw, you may use bind(this) on the helper function
Comment 2 Geoff Lankow (:darktrojan) 2011-10-05 16:23:13 PDT
Created attachment 565059 [details] [diff] [review]
patch using bind()

(In reply to Marco Bonardo [:mak] from comment #1)
> fwiw, you may use bind(this) on the helper function

That's probably a better way of doing it.
Comment 3 Geoff Lankow (:darktrojan) 2011-10-06 17:17:42 PDT
Pushing this to try since inbound is a mess currently, and I probably should've anyway.
https://tbpl.mozilla.org/?tree=Try&rev=97fbefeb0ee9
Comment 4 Geoff Lankow (:darktrojan) 2011-10-06 21:05:59 PDT
Try looks good, let's go!
Comment 6 Ed Morley [:emorley] 2011-10-07 04:40:56 PDT
Backed out:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ae27b467720c

Relanded with correct bug number (my bad, I should have double checked):
https://hg.mozilla.org/integration/mozilla-inbound/rev/97f2cd5ea1ee
Comment 7 Geoff Lankow (:darktrojan) 2011-10-07 04:44:12 PDT
Created attachment 565491 [details] [diff] [review]
patch with proper commit message

Same patch, with a proper commit message to prevent the wrong bug number landing on aurora.

Obligatory aurora approval comment: this is needed to prevent future changes to addons.sqlite breaking for users who use the same profile on different versions. With tests.
Comment 8 Matt Brubeck (:mbrubeck) 2011-10-07 12:40:49 PDT
https://hg.mozilla.org/mozilla-central/rev/97f2cd5ea1ee
Comment 9 Blair McBride [:Unfocused] (UNAVAILABLE) 2011-10-12 03:51:18 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/87be7145a73e
Comment 10 Daniel Holbert [:dholbert] 2011-10-18 16:26:08 PDT
For the record -- LegNeato mistakenly landed a partial version of this bug's patch on mozilla-beta:
  https://hg.mozilla.org/releases/mozilla-beta/rev/ad88c42b0255
and backed out because it caused timeouts in all testsuites (since it was missing most of the patch):
  https://hg.mozilla.org/releases/mozilla-beta/rev/dd943de3de11

(IIUC, the patch here isn't supposed to land on mozilla-beta anyway -- I think the fact that it landed there (even in part) was a mistake?)
Comment 11 Blair McBride [:Unfocused] (UNAVAILABLE) 2011-10-18 17:03:54 PDT
(In reply to Daniel Holbert [:dholbert] from comment #10)
> (IIUC, the patch here isn't supposed to land on mozilla-beta anyway -- I
> think the fact that it landed there (even in part) was a mistake?)

Correct. The code it fixes (from bug 664895) isn't even in mozilla-beta.
Comment 12 christian 2011-11-08 14:21:10 PST
WTF was I doing? Sorry about that folks.
Comment 13 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-11-21 17:36:29 PST
Is there something QA can do to verify this fix?
Comment 14 Dave Townsend [:mossop] 2011-11-22 11:49:36 PST
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #13)
> Is there something QA can do to verify this fix?

If you replace addons.sqlite with a corrupt db (just a text file would do) then open Firefox and the add-ons manager, the db should get re-created to a normal sqlite file and after a background update check will pull ratings etc. from AMO.
Comment 15 Virgil Dicu [:virgil] [QA] 2011-11-24 07:59:51 PST
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20100101 Firefox/9.0
Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20100101 Firefox/9.0
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0

Verified on Firefox9Beta3, Firefox 10 and 11 on Mac OS 10.6, Ubuntu 11.10, Windows 7 and XP. Replaced the file with a text document. The "addons.sqlite" file is recreated after opening Add-ons manager to its size.

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