Closed
Bug 815605
Opened 12 years ago
Closed 12 years ago
Ensure the registered observer gets removed in places.js shared module
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(firefox17 fixed, firefox18 fixed, firefox19 fixed, firefox20 fixed, firefox-esr10 fixed, firefox-esr17 fixed)
People
(Reporter: AndreeaMatei, Assigned: AndreeaMatei)
References
Details
(Whiteboard: [lib])
Attachments
(1 file)
2.14 KB,
patch
|
whimboo
:
review+
|
Details | Diff | Splinter Review |
At this moment, in removeAllHistory() method from places.js we don't ensure the removal of the observer, in case of a failure. We need to update that.
Assignee | ||
Updated•12 years ago
|
Whiteboard: [lib]
Assignee | ||
Updated•12 years ago
|
status-firefox-esr10:
--- → affected
status-firefox17:
--- → affected
status-firefox18:
--- → affected
status-firefox19:
--- → affected
status-firefox20:
--- → affected
status-firefox-esr17:
--- → affected
Assignee | ||
Comment 1•12 years ago
|
||
Ensuring we remove the observer with a try-finally block.
Assignee: nobody → andreea.matei
Status: NEW → ASSIGNED
Attachment #689628 -
Flags: review?(hskupin)
Attachment #689628 -
Flags: review?(dave.hunt)
Assignee | ||
Comment 2•12 years ago
|
||
With this changed I don't get any more "Browsing History has been cleared" failures, at least on default.
Comment 3•12 years ago
|
||
Comment on attachment 689628 [details] [diff] [review] patch v1 Review of attachment 689628 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/places.js @@ +104,5 @@ > function removeAllHistory() { > const TOPIC_EXPIRATION_FINISHED = "places-expiration-finished"; > > + // Set up an observer and a flag so we get notified when remove completes > + var finishedStateFlag = false; Nit for the future. Shorter names are preferred. A simple 'finished' would have been enough. @@ +107,5 @@ > + // Set up an observer and a flag so we get notified when remove completes > + var finishedStateFlag = false; > + var observer = { > + observe: function (aSubject, aTopic, aData) { > + finishedStateFlag = true; I still think we should also remove the observer here. Otherwise another notification could be caught which you would expect for another action. But this can be a follow-up bug. Please make sure to file it. And it should include all instances where we make use of observers in our libs and tests.
Attachment #689628 -
Flags: review?(hskupin)
Attachment #689628 -
Flags: review?(dave.hunt)
Attachment #689628 -
Flags: review+
Comment 4•12 years ago
|
||
http://hg.mozilla.org/qa/mozmill-tests/rev/77fb1ae5fe44 (default) (In reply to Andreea Matei [:AndreeaMatei] from comment #2) > With this changed I don't get any more "Browsing History has been cleared" > failures, at least on default. Lets see if that is true. If yes we can even close bug 800800.
Blocks: 800800
Comment 5•12 years ago
|
||
(In reply to Andreea Matei [:AndreeaMatei] from comment #2) > With this changed I don't get any more "Browsing History has been cleared" > failures, at least on default. It's still happening on default: http://mozmill-ci.blargon7.com/#/functional/report/352218d7e3125c857fc1d37167f01644 So this change doesn't fix bug 800800.
No longer blocks: 800800
Assignee | ||
Comment 6•12 years ago
|
||
That is a different failure, the one in bug 800800 is "Browsing History has been cleared" from removeAllHistory(), reproducible on Windows only.
Comment 7•12 years ago
|
||
Right, my fault. Please make sure to get it filed cause it seems to be regressed by a feature change in Firefox.
Blocks: 800800
Assignee | ||
Comment 8•12 years ago
|
||
This works as expected and the patch applies cleanly to all other branches.
Comment 9•12 years ago
|
||
Thank you Andreea. Landed on all other branches: http://hg.mozilla.org/qa/mozmill-tests/rev/7d9eb65fb583 (aurora) http://hg.mozilla.org/qa/mozmill-tests/rev/7c884448617a (beta) http://hg.mozilla.org/qa/mozmill-tests/rev/3f37a7148c49 (release) http://hg.mozilla.org/qa/mozmill-tests/rev/1f93684a26e6 (esr17) http://hg.mozilla.org/qa/mozmill-tests/rev/885f7932d9da (esr10)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•