Convert IPCBlobInputStreamThread to use the background thread pool
Categories
(Core :: DOM: File, task, P3)
Tracking
()
People
(Reporter: KrisWright, Unassigned)
References
(Blocks 1 open bug)
Details
Rather than use its own thread [1], IPCBlobInputStream can create and manipulate a background event target to dispatch tasks [2]. This work should go on the IO pool by using the NS_DISPATCH_EVENT_MAY_BLOCK
flag.
[1] https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/dom/file/ipc/IPCBlobInputStreamThread.h#44
[2] https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/xpcom/threads/nsThreadUtils.h#1763-1764
Updated•5 years ago
|
Comment 1•5 years ago
|
||
If this is available I'd like to take this bug. I think I understand what needs to be done though I'm still just learning the code base.
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Chris Fronk from comment #1)
If this is available I'd like to take this bug. I think I understand what needs to be done though I'm still just learning the code base.
I don't think anyone is currently working on this bug. :)
Comment 3•5 years ago
|
||
Thanks I'll go through and try to get a patch up for it
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Chris Fronk from comment #3)
Thanks I'll go through and try to get a patch up for it
Perfect! Feel free to ask here if you have any questions.
Comment 5•5 years ago
|
||
(In reply to Kris Wright :KrisWright from comment #4)
(In reply to Chris Fronk from comment #3)
Thanks I'll go through and try to get a patch up for it
Perfect! Feel free to ask here if you have any questions.
Thank you! I made the changes but still missing something because the dom/file tests have failures. Going to try to try to see if I can put together some sample js to hit this in the debugger. Curious is there an easy way to debug the c++ code during a test run on linux?
Reporter | ||
Comment 6•5 years ago
|
||
(In reply to Chris Fronk from comment #5)
Thank you! I made the changes but still missing something because the dom/file tests have failures. Going to try to try to see if I can put together some sample js to hit this in the debugger. Curious is there an easy way to debug the c++ code during a test run on linux?
The tests can all be run through a debugger of your choice. Most testing frameworks have a --debugger
argument that you can use to specify your debugger, or you can see what particular args you can use to customize your debug session with -h
or --help
.
Additionally, if you haven't already, you can build Firefox with debug symbols, which is usually the best way to deal with testfails.
Comment 7•5 years ago
|
||
Building with debug symbols has definitely made it easier.
There is more here than I originally was thinking there appears to be a number of assumptions in various other parts of the IPC code that the stream thread is always the same thread which is causing assertion failures in a number of places so far at least IPCBlobInputStreamChild and MessageChannel. Still working through here to figure out the implications of this, in general the issues seem to be limited to assertions but have to assume those assertions are in there for a reason so will try to work through those
Updated•2 years ago
|
Description
•