mirror of
https://github.com/servo/servo
synced 2026-04-26 17:45:19 +02:00
script: Pass &mut JSContext in FetchResponseListener::process_response_eof (#42729)
`process_response_eof` is the only method that needs cx at least right now. This PR removes one temp_cx and introduces one, removing that one will is hard (needs VirtualMethods and a lot of work) Testing: Just refactor Part of #40600 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
@@ -349,11 +349,12 @@ impl FetchResponseListener for StylesheetContext {
|
||||
|
||||
fn process_response_eof(
|
||||
mut self,
|
||||
cx: &mut js::context::JSContext,
|
||||
_: RequestId,
|
||||
status: Result<(), NetworkError>,
|
||||
timing: ResourceFetchTiming,
|
||||
) {
|
||||
network_listener::submit_timing(&self, &status, &timing, CanGc::note());
|
||||
network_listener::submit_timing(&self, &status, &timing, CanGc::from_cx(cx));
|
||||
|
||||
let document = self.document.root();
|
||||
let Some(metadata) = self.metadata.as_ref() else {
|
||||
|
||||
Reference in New Issue
Block a user