Martin Robinson
bfde51c0db
script: Have FetchResponseListener::process_response_eof consume the listener ( #40556 )
...
The goal of this change is to prevent having to copy so much data out of
listeners when a fetch completes, which will be particularly important
for off-the-main thread parsing of CSS (see #22478 ). This change has
pros and cons:
Pros:
- This makes the design of the `FetchResponseListener` a great deal
simpler.
They no longer individually store a dummy `ResourceFetchTiming` that is
only replaced right before `process_response_eof`.
- The creation of the `Arc<Mutex<FetchResponseListener>>` in the
`NetworkListener` is abstracted away from clients and now they just
pass the `FetchResponseListener` to the fetch methods in the global.
Cons:
- Now each `FetchResponseListener` must explicitly call `submit_timing`
instead of having the `NetworkListener` do it. This is arguably a bit
easier to follow in the code.
- Since the internal data of the `NetworkListener` is now an
`Arc<Mutex<Option<FetchResponseListener>>>`, when the fetching code
needs to share state with the `NetworkListener` it either needs to
share an `Option` or some sort of internal state. In one case I've
stored the `Option` and in another case, I've stored a new inner
shared value.
Testing: This should not change observable behavior and is thus covered
by existing tests.
Fixes : #22550
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com >
2025-11-11 22:30:40 +00:00
..
2025-11-07 01:08:00 +00:00
2025-11-08 14:27:35 +00:00
2025-11-06 11:06:03 +00:00
2025-11-08 04:49:04 +00:00
2025-11-04 07:15:51 +00:00
2025-11-11 09:59:22 +00:00
2025-11-06 11:06:03 +00:00
2025-10-02 04:17:36 +00:00
2025-11-11 22:30:40 +00:00
2025-11-08 04:49:04 +00:00
2025-11-11 02:59:38 +00:00
2025-11-07 02:56:30 +00:00
2025-11-11 22:30:40 +00:00
2025-11-11 09:51:26 +00:00
2025-11-10 10:09:03 +00:00
2025-11-10 11:41:59 +00:00
2025-11-08 14:27:35 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-11-08 14:27:35 +00:00
2025-11-11 22:30:40 +00:00
2025-09-13 18:34:14 +00:00
2025-11-11 22:30:40 +00:00
2025-08-19 11:07:53 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-04 18:29:06 +00:00
2025-11-01 05:32:45 +00:00
2025-11-09 22:05:12 +00:00
2025-09-27 19:23:05 +00:00
2025-11-08 14:27:35 +00:00
2025-11-07 01:08:00 +00:00
2025-11-04 18:29:06 +00:00
2025-10-05 15:12:16 +00:00
2025-11-04 20:43:59 +00:00
2025-11-04 18:29:06 +00:00
2025-11-04 18:29:06 +00:00
2025-11-05 05:22:13 +00:00
2025-11-08 14:27:35 +00:00
2025-11-10 13:45:56 +00:00
2025-11-08 14:27:35 +00:00
2025-11-04 18:29:06 +00:00
2025-11-04 18:29:06 +00:00
2025-11-04 19:15:34 +00:00
2025-11-04 18:29:06 +00:00
2025-07-09 19:07:29 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-10-09 18:18:03 +00:00
2025-10-23 14:02:28 +00:00
2025-10-05 15:12:16 +00:00
2025-10-05 15:12:16 +00:00
2025-10-26 03:15:20 +00:00
2025-08-12 04:53:53 +00:00
2025-11-06 19:43:52 +00:00
2025-11-05 05:22:13 +00:00
2025-11-04 18:29:06 +00:00
2025-11-04 18:29:06 +00:00
2025-11-01 05:32:45 +00:00
2025-11-04 18:29:06 +00:00
2025-11-11 11:03:41 +00:00
2025-11-11 11:03:41 +00:00
2025-11-11 22:30:40 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-10-06 17:23:03 +00:00
2025-11-01 05:32:45 +00:00
2025-09-09 08:33:46 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-10-26 01:34:06 +00:00
2025-11-01 05:32:45 +00:00
2025-11-10 10:09:03 +00:00
2025-10-26 03:29:51 +00:00
2025-11-01 05:32:45 +00:00
2025-10-26 11:36:36 +00:00
2025-11-11 22:30:40 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-10-02 07:51:19 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-09 22:05:12 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-11 22:30:40 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-08-19 11:07:53 +00:00
2025-10-25 08:53:05 +00:00
2025-11-08 23:04:03 +00:00
2025-11-03 15:19:34 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-07 01:08:00 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-04 18:29:06 +00:00
2025-11-04 18:29:06 +00:00
2025-10-09 18:18:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-11 22:30:40 +00:00
2025-11-10 10:09:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-11 22:30:40 +00:00
2025-11-01 05:32:45 +00:00
2025-11-10 11:41:59 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-08-09 18:01:00 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-08-04 16:27:00 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-11 22:30:40 +00:00
2025-11-01 05:32:45 +00:00
2025-11-08 14:27:35 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-09-09 08:33:46 +00:00
2025-11-01 05:32:45 +00:00
2025-11-07 01:08:00 +00:00
2025-08-31 01:00:09 +00:00
2025-08-19 11:07:53 +00:00
2025-11-09 22:05:12 +00:00
2025-10-05 15:12:16 +00:00
2025-11-06 11:06:03 +00:00
2025-11-09 22:05:12 +00:00
2025-11-11 22:30:40 +00:00
2025-10-23 14:02:28 +00:00
2025-11-01 05:32:45 +00:00
2025-11-03 15:19:34 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-09-26 22:12:37 +00:00
2025-11-07 01:08:00 +00:00
2025-11-06 11:06:03 +00:00
2025-11-08 14:27:35 +00:00
2025-08-19 11:07:53 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-08-31 01:00:09 +00:00
2025-11-11 09:51:26 +00:00
2025-11-07 01:08:00 +00:00
2025-11-11 11:03:41 +00:00
2025-11-04 18:29:06 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-07 01:08:00 +00:00
2025-11-02 18:20:18 +00:00
2025-09-15 08:50:16 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-10-15 07:42:11 +00:00
2025-10-15 07:42:11 +00:00
2025-10-15 07:42:11 +00:00
2025-11-10 13:45:56 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-06 11:06:03 +00:00
2025-10-09 18:18:03 +00:00
2025-08-31 01:00:09 +00:00
2025-10-26 03:29:51 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 05:32:45 +00:00
2025-11-01 10:01:15 +00:00
2025-10-29 11:41:52 +00:00
2025-11-07 01:08:00 +00:00
2025-11-07 01:08:00 +00:00
2025-11-06 11:06:03 +00:00
2025-11-01 05:32:45 +00:00
2025-11-09 05:17:26 +00:00
2025-11-08 11:16:58 +00:00
2025-11-10 11:41:59 +00:00
2025-11-10 11:41:59 +00:00
2025-11-06 11:06:03 +00:00
2025-11-06 11:06:03 +00:00
2025-10-05 15:12:16 +00:00
2025-11-01 05:32:45 +00:00
2025-11-11 22:30:40 +00:00
2025-11-01 05:32:45 +00:00
2025-10-25 23:25:01 +00:00
2025-11-06 12:24:07 +00:00
2025-11-06 12:24:07 +00:00