add an observer notification to nsFileChannel
Categories
(Core :: Networking: File, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: jwalker, Assigned: dotoole)
References
(Depends on 1 open bug, Blocks 4 open bugs)
Details
(Keywords: DevAdvocacy, parity-chrome, Whiteboard: [polish-backlog][DevRel:P2])
Attachments
(1 file, 3 obsolete files)
Comment 1•11 years ago
|
||
Comment 3•10 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Reporter | ||
Comment 4•10 years ago
|
||
Comment 5•9 years ago
|
||
Updated•9 years ago
|
Comment 6•8 years ago
|
||
Comment 8•8 years ago
|
||
![]() |
||
Comment 10•7 years ago
|
||
Updated•7 years ago
|
Comment 13•5 years ago
|
||
Similarly, it seems local HTML files making remote network requests also show no activity which seemed surprising.
For example, this file has no network activity for me (Firefox 80.0 (64-bit) on Ubuntu 18.04).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
</head>
<body>Hello</body>
</html>
Updated•3 years ago
|
Comment 14•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 4 duplicates.
:Honza, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 15•3 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Updated•3 years ago
|
Comment 16•3 years ago
|
||
We might be able to reuse this old nsIWebProgressListener trick:
https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/devtools/server/actors/webconsole/listeners/console-file-activity.js#71-104
But may be there is something better to do. This might only catch document requests and still ignore any other resource (JS, CSS, Images,...)?
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Some information from the DevTools / BiDi point of view.
DevTools and BiDi both use the NetworkObserver helper in order to monitor network requests. This helper uses various observer notifications as well as activities (nsIHttpActivityObserver) to catch requests. For instance, we catch regular requests when we get the ACTIVITY_SUBTYPE_REQUEST_HEADER
activity, meaning request headers should be available. And we catch some cached requests using the "http-on-examine-cached-response" observer notification. Other codepaths are used for service worker requests, early blocked requests, ...
They all end up creating a "network event" via #createNetworkEvent
. This network event will be notified to the consumer, which will in exchange provide an owner
object implementing several callbacks that will be called during the lifecycle of the network event or as we collect more information about it (eg addResponseStart
, addResponseContent
, addSecurityInfo
).
So one option could be to modify the NetworkObserver to call #createNetworkEvent
whenever a file:// request happens, but we might have issues with all the code which handles the lifecycle of the NetworkEvent after its' creation, as it normally assumes we have a nsIHttpChannel.
For devtools it might be a better idea to handle this at the NetworkEventWatcher level, which is basically the server part of devtools, responsible for translating platform information into something the DevTools UI can handle. This class currently consumes network events from the NetworkObserver and network event "resources" (around here). We even have a separate watcher for content process network events at devtools/server/actors/resources/network-events-content.js, which listens to different observers, but emits a similar payload.
So based on that I think we should try to have an observer notification for file requests and answer a few questions:
- can we match the expected payload of those network event watchers (can we fill all the properties? etc...)
- is it observable in the parent process or content process
- can we know for which browsing context it was initiated
Note that typically the network events have 2 states for the DevTools UI: created and completed, but afterwards the client can ask for some additional information about the request.
All in all, the setup for network events in devtools is unnecessarily layered and complicated, so it would probably make sense to split the work between Necko and DevTools. If you can provide an observer notification we can try it out and see what would be the best path to implement this.
Assignee | ||
Comment 18•2 years ago
|
||
Comment 19•2 years ago
|
||
In case it was missed, I had a question on phabricator about the patch: https://phabricator.services.mozilla.com/D191317
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 20•2 years ago
|
||
Updated•2 years ago
|
Comment 21•2 years ago
|
||
Comment 22•2 years ago
|
||
Backed out for causing build bustages in nsIPrincipal.h
- Backout link
- Push with failures
- Failure Log
- Failure line: /builds/worker/workspace/obj-build/dist/include/nsIPrincipal.h:358:20: error: inline function 'nsIPrincipal::IsSystemPrincipal' is not defined [-Werror,-Wundefined-inline]
gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:688: nsFileChannel.o] Error 1
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
bugherder |
Comment 25•2 years ago
|
||
Is this something we wanted to call out in the Fx121 relnotes? Please set the relnote-firefox: ?
flag to nominate if yes.
We only landed the platform notification, not the UI. Dylan do you want to reopen the bug for the devtools part, or do you plan to move that patch to a new bug?
Assignee | ||
Comment 27•2 years ago
|
||
Thanks for responding, yes I reopened it
Assignee | ||
Comment 29•2 years ago
|
||
Assignee | ||
Comment 31•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 32•2 years ago
|
||
Comment 33•2 years ago
|
||
bugherder |
I think we still have some pending patches here.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 36•2 years ago
|
||
Comment 37•2 years ago
|
||
Backed out for causing xpcshell failures on test_pause.js.
This only happened on Linux 18.04 x64 WebRender tsan opt.
[task 2023-12-14T22:47:08.099Z] 22:47:08 INFO - TEST-START | tools/profiler/tests/xpcshell/test_pause.js
[task 2023-12-14T22:52:08.101Z] 22:52:08 WARNING - TEST-UNEXPECTED-TIMEOUT | tools/profiler/tests/xpcshell/test_pause.js | Test timed out
[task 2023-12-14T22:52:08.102Z] 22:52:08 INFO - TEST-INFO took 300000ms
[task 2023-12-14T22:52:08.102Z] 22:52:08 INFO - >>>>>>>
[task 2023-12-14T22:52:08.102Z] 22:52:08 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2023-12-14T22:52:08.102Z] 22:52:08 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2023-12-14T22:52:08.102Z] 22:52:08 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2023-12-14T22:52:08.103Z] 22:52:08 INFO - running event loop
[task 2023-12-14T22:52:08.103Z] 22:52:08 INFO - tools/profiler/tests/xpcshell/test_pause.js | Starting
[task 2023-12-14T22:52:08.103Z] 22:52:08 INFO - (xpcshell/head.js) | test pending (2)
[task 2023-12-14T22:52:08.103Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.104Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.104Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.104Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.104Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.105Z] 22:52:08 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2023-12-14T22:52:08.105Z] 22:52:08 INFO - "CONSOLE_MESSAGE: (info) No chrome package registered for chrome://branding/locale/brand.properties"
[task 2023-12-14T22:52:08.105Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.105Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.105Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.106Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.106Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.106Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.106Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.107Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.107Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.107Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.107Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.107Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.108Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.109Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.109Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.109Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.109Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.109Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.110Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.110Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.110Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.110Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.110Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.111Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.111Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.111Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.111Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.111Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.112Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.112Z] 22:52:08 INFO - TEST-PASS | tools/profiler/tests/xpcshell/test_pause.js | - true == true
[task 2023-12-14T22:52:08.112Z] 22:52:08 INFO - <<<<<<<
[task 2023-12-14T22:52:08.112Z] 22:52:08 INFO - xpcshell return code: None
[task 2023-12-14T22:52:08.112Z] 22:52:08 INFO - tools/profiler/tests/xpcshell/test_pause.js | Process still running after test!
[task 2023-12-14T22:52:09.139Z] 22:52:09 INFO - INFO | Result summary:
[task 2023-12-14T22:52:09.140Z] 22:52:09 INFO - INFO | Passed: 591
[task 2023-12-14T22:52:09.140Z] 22:52:09 WARNING - INFO | Failed: 1
[task 2023-12-14T22:52:09.140Z] 22:52:09 WARNING - One or more unittests failed.
[task 2023-12-14T22:52:09.141Z] 22:52:09 INFO - INFO | Todo: 4
[task 2023-12-14T22:52:09.141Z] 22:52:09 INFO - INFO | Retried: 1
[task 2023-12-14T22:52:09.144Z] 22:52:09 INFO - SUITE-END | took 2308s
[task 2023-12-14T22:52:09.144Z] 22:52:09 INFO - Node moz-http2 server shutting down ...
[task 2023-12-14T22:52:09.144Z] 22:52:09 INFO - http3Server server shutting down ...
[task 2023-12-14T22:52:09.270Z] 22:52:09 INFO - Return code: 1
[task 2023-12-14T22:52:09.270Z] 22:52:09 INFO - TinderboxPrint: xpcshell-xpcshell<br/>591/<em class="testfail">1</em>/4
[task 2023-12-14T22:52:09.271Z] 22:52:09 WARNING - setting return code to 2
[task 2023-12-14T22:52:09.271Z] 22:52:09 INFO - The xpcshell suite: xpcshell ran with return status: FAILURE
Updated•2 years ago
|
Comment 38•2 years ago
•
|
||
Dylan: Since we already landed a first platform patch here, it becomes a bit hard to track the status of this work.
I think we should rather rename this bug to add an observer notification to nsFileChannel
, close it, and handle the followup work in other bugs. Eg file a necko bug for "add mChannelId attribute to nsFileChannel", and another one for doing the DevTools UI work.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 39•2 years ago
|
||
Comment on attachment 9368099 [details]
Bug 1000540 - added mChannelId attribute to nsFileChannel. r=valentin
Revision D196137 was moved to bug 1870582. Setting attachment 9368099 [details] to obsolete.
Comment 40•2 years ago
|
||
Comment on attachment 9359118 [details]
Bug 1000540 - added fileChannel observer to netmonitor to display file urls. r=bomsy
Revision D191317 was moved to bug 1870580. Setting attachment 9359118 [details] to obsolete.
Description
•