Created attachment 633489 [details] [diff] [review] trivial patch When given a page that isn't in the list of registered pages, NewTabUtils.allPages.unregister() will still remove a page because it doesn't check if indexOf() > -1.
Attachment #633489 - Flags: review?(mak77)
Comment on attachment 633489 [details] [diff] [review] trivial patch How'd you find this? Presumably in practice unregister never gets called for pages that haven't been registered?
Attachment #633489 - Flags: review?(mak77) → review+
(In reply to :Gavin Sharp (use email@example.com for email) from comment #1) > How'd you find this? Presumably in practice unregister never gets called for > pages that haven't been registered? Right, while working on bug 753448 I noticed that the preloaded about:newtab instances were out of sync because they weren't tracked anymore. This happens because of how we use registerCleanupFunction() here to make sure the dummy page gets removed when timing out: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/newtab/head.js#312
Target Milestone: --- → Firefox 16
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.