Closed
Bug 1186780
Opened 9 years ago
Closed 9 years ago
Use some new hashtable iterators
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla42
People
(Reporter: khuey, Assigned: khuey)
References
Details
Attachments
(3 files)
4.93 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
30.73 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
8.83 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8637719 -
Flags: review?(dbaron)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8637720 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8637721 -
Flags: review?(continuation)
Comment 4•9 years ago
|
||
I might not get to this review this week; I have a huge review backlog already. :(
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8637720 [details] [diff] [review]
DOM
Moving down the list of people who start with b ...
Attachment #8637720 -
Flags: review?(bzbarsky) → review?(bkelly)
Comment 6•9 years ago
|
||
Comment on attachment 8637721 [details] [diff] [review]
Cycle collection
Review of attachment 8637721 [details] [diff] [review]:
-----------------------------------------------------------------
nice
Attachment #8637721 -
Flags: review?(continuation) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8637720 [details] [diff] [review]
DOM
Review of attachment 8637720 [details] [diff] [review]:
-----------------------------------------------------------------
I must admit the diff algorithm gave some hard to read hunks for the macro changes in nsDocument.cpp, but I think this is correct. Just a couple questions and nit.
Also, please remember to update the bug number and reviewer in the commit message.
Thanks.
::: dom/base/nsDocument.cpp
@@ +2034,5 @@
> if (tmp->mAnimationController) {
> tmp->mAnimationController->Unlink();
> }
>
> + tmp->MaybeClearBoxObjectTable();
Any particular reason you moved clearing the box table further down in the steps here? This used to take place after:
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPreloadingImages)
@@ +3779,5 @@
> + return;
> + }
> +
> + for (auto iter = mBoxObjectTable->ConstIter(); !iter.Done(); iter.Next()) {
> + if (auto boxObject = iter.UserData()) {
nit: I personally prefer to see the variable declaration on a separate line. Assignment in an if-statement seems to favor cleverness over clarity. Here and elsewhere in the patch.
This is a style thing, though, so I won't make you change it if you greatly prefer this.
@@ +10607,5 @@
>
> // Otherwise, iterate over our images and perform the appropriate action.
> + for (auto iter = mImageTracker.ConstIter(); !iter.Done(); iter.Next()) {
> + imgIRequest* image = iter.Key();
> + if (aLocked) {
Are these methods particularly hot? It seems you've moved an if-check inside a for loop which could have some perf impact.
Attachment #8637720 -
Flags: review?(bkelly) → review+
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #7)
> Any particular reason you moved clearing the box table further down in the
> steps here? This used to take place after:
Nope, fixed.
> nit: I personally prefer to see the variable declaration on a separate line.
> Assignment in an if-statement seems to favor cleverness over clarity. Here
> and elsewhere in the patch.
>
> This is a style thing, though, so I won't make you change it if you greatly
> prefer this.
I really like that style, so I've left it as is.
> Are these methods particularly hot? It seems you've moved an if-check
> inside a for loop which could have some perf impact.
Excellent question. These functions are called when the presshell is frozen or thawed, or when the active state of the docshell changes. None of those should happen frequently, and none of them are performance sensitive to the level at which a branch would affect them.
Assignee | ||
Updated•9 years ago
|
Keywords: leave-open
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
this caused massive test bustages due to crashes like https://treeherder.mozilla.org/logviewer.html#?job_id=12136520&repo=mozilla-inbound
Flags: needinfo?(khuey)
Assignee | ||
Comment 12•9 years ago
|
||
The problem is in the DOM patch, so I've relanded the cycle collector one.
Flags: needinfo?(khuey)
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Comment on attachment 8637719 [details] [diff] [review]
ImageLoader
I wonder if this pattern (twice) is really needed:
>+ auto key = iter.Key();
>+ imgIRequest* request = static_cast<imgIRequest*>(key);
>+ auto key = iter.Key();
>+ imgIRequest* request = static_cast<imgIRequest*>(key);
Otherwise, r=dbaron
Attachment #8637719 -
Flags: review?(dbaron) → review+
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
Comment 18•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•