Closed Bug 1333977 Opened 8 years ago Closed 7 years ago

Label IDecodingTask runnables

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1359833

People

(Reporter: billm, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

IDecodingTask::NotifyProgress and IDecodingTask::NotifyDecodeComplete run quite often. It looks like they can cause JS to run synchronously. To label them, we need to find a path to the document or window that the JS will run in. I'm not sure how to do that.
Images aren't associated with one document, they are shared between documents. The observers that are called could be in more than one document.
In that case I think we'll need to split this into multiple runnables. What would be the best place to do that, so that we know when we dispatch each runnable which document it's for?
Priority: -- → P2
Well there isn't really a good place. The notifications (after updating the main thread state on RasterImage) will go through ProgressTracker which dispatches them to the various observers. But that's not the end of up. nsImageLoadingContent can be one of those observers and it also accepts observers that it will forward notifications too. Further, the both of these lists of observers can change while an image decoding thread is working and before it posts it results back to the main thread. Is it only JS that needs to be labelled? Cause I think all of those should go through ScriptedNotificationObserver. We could use another runnable in that class, it's only used for tests and a few addons. We'll have to update some tests though.
(In reply to Timothy Nikkel (:tnikkel) from comment #3) > Is it only JS that needs to be labelled? Cause I think all of those should > go through ScriptedNotificationObserver. We could use another runnable in > that class, it's only used for tests and a few addons. We'll have to update > some tests though. Anything that changes the DOM in a way that JS can observe also needs to be labeled.
Component: DOM → ImageLib
Priority: P2 → --
Whiteboard: [gfx-noted]
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.