Closed
Bug 1269737
Opened 9 years ago
Closed 9 years ago
Make AsyncFaviconHelpers more maintainable
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(6 files, 1 obsolete file)
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
There are various things we can do to simplify this code:
1. use nsMainThreadPtrHandle for the callback, currently we are doing a fancy .swap to avoid addrefing on the wrong thread
2. then we don't need anymore to derive from a base class, it can be completely removed, that ends up simplifying some of the classes who don't need a callback
3. merge classes that only depend on another class
4. properly set classes as final
5. use fatal asserts all around
6. merge ::Start methods directly into nsFaviconService.cpp. The reason this was not done originally is that we had 2 APIs implemented in parallel, but the old API is gone, so it makes sense to move back some code.
7. Likely rename to just FaviconHelpers
Since I have already done some of this work as part of bug 1265420, and since we plan to work on hi-dpi favicons, it's worth doing these cleanups now.
Assignee | ||
Comment 1•9 years ago
|
||
I'll merge the patches before landing, so please ignore commit messages.
I'm also not using mozreview cause these are built on top of bug 1265420 and I'm not sure how to manage 2 different concatenated reviews in draft mode... maybe it works, not sure.
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8748198 -
Flags: review?(adw)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8748199 -
Flags: review?(adw)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8748201 -
Flags: review?(adw)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8748202 -
Flags: review?(adw)
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8748204 -
Flags: review?(adw)
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8748206 -
Flags: review?(adw)
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8748204 -
Attachment is obsolete: true
Attachment #8748204 -
Flags: review?(adw)
Attachment #8748214 -
Flags: review?(adw)
Assignee | ||
Updated•9 years ago
|
Blocks: PlacesHiresFavicons
Updated•9 years ago
|
Attachment #8748198 -
Flags: review?(adw) → review+
Updated•9 years ago
|
Attachment #8748199 -
Flags: review?(adw) → review+
Updated•9 years ago
|
Attachment #8748201 -
Flags: review?(adw) → review+
Comment 9•9 years ago
|
||
Comment on attachment 8748202 [details] [diff] [review]
Part4: Use fatal assertions
Review of attachment 8748202 [details] [diff] [review]:
-----------------------------------------------------------------
Might be worth #defining ASSERT_MAIN_THREAD, ASSERT_NOT_MAIN_THREAD? Seems like there should be MOZ versions of those available globally but I don't think there are.
Attachment #8748202 -
Flags: review?(adw) → review+
Updated•9 years ago
|
Attachment #8748206 -
Flags: review?(adw) → review+
Updated•9 years ago
|
Attachment #8748214 -
Flags: review?(adw) → review+
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Drew Willcoxon :adw from comment #9)
> Might be worth #defining ASSERT_MAIN_THREAD, ASSERT_NOT_MAIN_THREAD? Seems
> like there should be MOZ versions of those available globally but I don't
> think there are.
It may be nice, but the benefit is very tiny, MOZ_ASSERT(NS_IsMainThead()) is just 10 chars more than ASSERT_MAIN_THREAD.
Comment 12•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•