Closed
Bug 1378488
Opened 7 years ago
Closed 7 years ago
label FinishPreparingForNewPartRunnable
Categories
(Core :: Graphics: ImageLib, enhancement, P3)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: froydnj, Assigned: aosmond)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
aosmond
:
review+
|
Details | Diff | Splinter Review |
This runnable is in the top 25 or so unlabeled runnables according to telemetry.
Updated•7 years ago
|
Whiteboard: [gfx-noted]
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
This should be able to follow on directly from bug 1359833 as we add ProgressTracker::GetEventTarget which can be used to get the best-effort labelled guess. imgRequest::FinishPreparingForNewPart itself does not appear to have any label/document specific calls, so a simple dispatch on the right target is all we need.
Depends on: 1359833
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8888306 -
Flags: review?(tnikkel)
Assignee | ||
Updated•7 years ago
|
Attachment #8888307 -
Flags: review?(tnikkel)
Comment 5•7 years ago
|
||
Comment on attachment 8888306 [details] [diff] [review]
Part 1. imgRequest::FinishPreparingForNewPart should dispatch using ProgressTracker::GetEventTarget., v1
Why is calling FinishPreparingForNewPart on the current thread the right thing to do if we don't have an event target?
Comment 6•7 years ago
|
||
Comment on attachment 8888307 [details] [diff] [review]
Part 2. imgRequest::Cancel should dispatch using ProgressTracker::GetEventTarget., v1
Here we don't nullcheck eventTarget, so it's always non-null?
Assignee | ||
Comment 7•7 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #5)
> Comment on attachment 8888306 [details] [diff] [review]
> Part 1. imgRequest::FinishPreparingForNewPart should dispatch using
> ProgressTracker::GetEventTarget., v1
>
> Why is calling FinishPreparingForNewPart on the current thread the right
> thing to do if we don't have an event target?
It is indirectly a way to check NS_IsMainThread() since eventTarget is only set if it isn't the main thread. I can add an assert for this inside the if block -- it is a bit counter-intuitive.
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #6)
> Comment on attachment 8888307 [details] [diff] [review]
> Part 2. imgRequest::Cancel should dispatch using
> ProgressTracker::GetEventTarget., v1
>
> Here we don't nullcheck eventTarget, so it's always non-null?
Yes, ProgressTracker::GetEventTarget will always give a valid event target (mEventTarget is NotNull). I think I tried to make GetEventTarget return NotNull as well, but there were some callers which wanted *their* mEventTarget to be null sometimes, and there was hairy to put a NotNull<RefPtr> into a RefPtr without adjusting the refcount again, so I didn't make it return that.
Comment 9•7 years ago
|
||
(In reply to Andrew Osmond [:aosmond] from comment #7)
> (In reply to Timothy Nikkel (:tnikkel) from comment #5)
> > Comment on attachment 8888306 [details] [diff] [review]
> > Part 1. imgRequest::FinishPreparingForNewPart should dispatch using
> > ProgressTracker::GetEventTarget., v1
> >
> > Why is calling FinishPreparingForNewPart on the current thread the right
> > thing to do if we don't have an event target?
>
> It is indirectly a way to check NS_IsMainThread() since eventTarget is only
> set if it isn't the main thread. I can add an assert for this inside the if
> block -- it is a bit counter-intuitive.
Okay, just put something there to make that clear, otherwise it seems weird.
Updated•7 years ago
|
Attachment #8888306 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 10•7 years ago
|
||
Add comment and assert.
Attachment #8888306 -
Attachment is obsolete: true
Attachment #8897125 -
Flags: review+
Updated•7 years ago
|
Attachment #8888307 -
Flags: review?(tnikkel) → review+
Comment 11•7 years ago
|
||
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ed28a90d1edb
Part 1. imgRequest::FinishPreparingForNewPart should dispatch using ProgressTracker::GetEventTarget. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/013c4af28c40
Part 2. imgRequest::Cancel should dispatch using ProgressTracker::GetEventTarget. r=tnikkel
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ed28a90d1edb
https://hg.mozilla.org/mozilla-central/rev/013c4af28c40
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•