Hang from await fetch + StreamListenerTee intended to capture HTTP response body
Categories
(Core :: Networking, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | affected |
People
(Reporter: WeirdAl, Unassigned)
Details
(Keywords: hang, reproducible, testcase)
Attachments
(2 files)
I was trying to write a JavaScript XPCOM component to extract the HTTP request headers and body, and HTTP response headers and body, as a prototype for something more advanced - and to help me write documentation for the same in bug 1734764.
Alas, I hit a hang extracting the HTTP response body when a StreamListenerTee my component created was listening to an await fetch
request to getpocket.cdn.mozilla.net .
I'm attaching the source code I'd drawn up to go in mozilla-central/extensions/http-experiments . So adding it to a build for testing purposes is simply ac_add_options --enable-extensions=default,http-experiments
.
Interestingly enough, the stack trace illustrating the hang has no JavaScript frames on it. Since this is a clean build of mozilla-central with only the added JS component, I'm at a bit of a loss. That stack trace is coming in another attachment.
I'm filing for two reasons. One, JS causing a hang is bad. Two, I'm fully willing to admit I might not be doing this The Right Way and would appreciate directions. (I still haven't really figured out how to deal with multi-process Firefox yet.)
I'm not sure this is in the right bug component.
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
I figured it out. I didn't have nearly enough segments in my pipe.
Description
•