Closed
Bug 1404408
Opened 7 years ago
Closed 6 years ago
StreamFilter onstop is not called when filter.close is called.
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(firefox57 affected)
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox57 | --- | affected |
People
(Reporter: robwu, Unassigned)
References
Details
Attachments
(1 file)
1.04 KB,
application/x-xpinstall
|
Details |
When I load a http:-URL in a document and suspend and close the filter as shown below, then the document gets stuck at loading. let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstart = () => { filter.suspend(); filter.resume(); // <-- Adding/removing this makes no difference. filter.close(); }; STR: 1. Load attached extension. 2. click on the extension button to load a test page. 3. Look at the page. 4. Look at the console. Expected: At step 3: The document should stop loading (and be blank). At step 4: The console should show print: filter.onstart, filter.onstop Actual: At step 3: The document loads forever, the status bar shows "Transferring data from example.com..." At step 4: The console only shows the filter.onstart event. While running the above steps, stderr contains: ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost More info: - I tried to schedule filter.close later, e.g. in a microtask (Promise) or macrotask (setTimeout), but the problem still occurs. Only when I moved the filter.close call inside filter.ondata, the problem disappeared. - This problem only happens with http:, not with https:. Tested with Firefox Nightly 58.0a1 build ID 20170926100259 on ArchLinux.
Comment 2•7 years ago
|
||
Guessing at P2, but waiting for comment 2.
status-firefox57:
--- → affected
Priority: -- → P2
Comment 3•6 years ago
|
||
The problem with document loading finishing no longer occurs, however you still do not see any logging from onerror or onstop. Leaving ni? for kris.
Priority: P2 → P3
Summary: Documents from http:-URLs get stuck at loading when a suspended StreamFilter is closed before ondata event → StreamFilter onstop is not called when filter.close is called.
Comment 4•6 years ago
|
||
onstop is intentionally not called after close()
Flags: needinfo?(kmaglione+bmo)
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•