Closed Bug 1378488 Opened 7 years ago Closed 7 years ago

label FinishPreparingForNewPartRunnable

Categories

(Core :: Graphics: ImageLib, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: froydnj, Assigned: aosmond)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 1 obsolete file)

This runnable is in the top 25 or so unlabeled runnables according to telemetry.
Whiteboard: [gfx-noted]
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
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
Attachment #8888306 - Flags: review?(tnikkel)
Attachment #8888307 - Flags: review?(tnikkel)
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 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?
(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.
(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.
(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.
Attachment #8888306 - Flags: review?(tnikkel) → review+
Attachment #8888307 - Flags: review?(tnikkel) → review+
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
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: