Closed
Bug 765211
Opened 13 years ago
Closed 13 years ago
[New Tab Page] AllPages.unregister() can possibly remove wrong pages
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 16
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file)
|
703 bytes,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
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 1•13 years ago
|
||
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+
| Assignee | ||
Comment 2•13 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.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
| Assignee | ||
Comment 3•13 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
| Assignee | ||
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•13 years ago
|
Whiteboard: [fixed-in-fx-team]
You need to log in
before you can comment on or make changes to this bug.
Description
•