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.
fwiw, you may use bind(this) on the helper function
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.
Pushing this to try since inbound is a mess currently, and I probably should've anyway.
Try looks good, let's go!
Relanded with correct bug number (my bad, I should have double checked):
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.
For the record -- LegNeato mistakenly landed a partial version of this bug's patch on mozilla-beta:
and backed out because it caused timeouts in all testsuites (since it was missing most of the patch):
(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?)
(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.
WTF was I doing? Sorry about that folks.
Is there something QA can do to verify this fix?
(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.
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.