From 3878ca8f8237def89fec7d4e5dde0012c0bc10b1 Mon Sep 17 00:00:00 2001 From: ldm0 Date: Wed, 7 Oct 2026 01:41:53 +0800 Subject: [PATCH] fix(renderer): adapt main fetch and document-start changes --- moli-core/tests/web_apis.rs | 8 -------- moli-core/tests/web_apis/fetched_null_body.rs | 2 +- moli-renderer-v8/src/context_bootstrap/event_template.rs | 5 ----- moli-renderer-v8/src/context_bootstrap/events.rs | 3 --- moli-renderer-v8/src/script_vm/eval_exec.rs | 6 ++++-- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/moli-core/tests/web_apis.rs b/moli-core/tests/web_apis.rs index f046d12a43..3bad3e1eb8 100644 --- a/moli-core/tests/web_apis.rs +++ b/moli-core/tests/web_apis.rs @@ -29,8 +29,6 @@ use tokio::time::Duration; mod abort_signal; #[path = "web_apis/body_state.rs"] mod body_state; -#[path = "web_apis/body_utf8.rs"] -mod body_utf8; #[path = "web_apis/callback_cleanup.rs"] mod callback_cleanup; #[path = "web_apis/event_dispatch.rs"] @@ -43,12 +41,6 @@ mod fetch_body_realm; mod fetch_opaque_stream; #[path = "web_apis/fetch_preaborted_upload.rs"] mod fetch_preaborted_upload; -#[path = "web_apis/font_queries.rs"] -mod font_queries; -#[path = "web_apis/indexed_db_transaction.rs"] -mod indexed_db_transaction; -#[path = "web_apis/locked_body.rs"] -mod locked_body; #[path = "web_apis/pipe_disturbed.rs"] mod pipe_disturbed; #[path = "web_apis/request_init.rs"] diff --git a/moli-core/tests/web_apis/fetched_null_body.rs b/moli-core/tests/web_apis/fetched_null_body.rs index 457c1a788b..1170a9f3b9 100644 --- a/moli-core/tests/web_apis/fetched_null_body.rs +++ b/moli-core/tests/web_apis/fetched_null_body.rs @@ -58,7 +58,7 @@ async fn fetched_null_bodies_stay_unused_through_consumption_cloning_and_abort() for target in ["window", "child", "worker"] { let observed = tokio::time::timeout( Duration::from_secs(20), - super::pipe_disturbed::run_probe(&browser, &server, target, &source), + super::event_dispatch::run_probe(&browser, &server, target, &source), ) .await??; assert_eq!(observed, serde_json::json!({"errors": []}), "{target}"); diff --git a/moli-renderer-v8/src/context_bootstrap/event_template.rs b/moli-renderer-v8/src/context_bootstrap/event_template.rs index 4d5cad6e37..9aeebf9658 100644 --- a/moli-renderer-v8/src/context_bootstrap/event_template.rs +++ b/moli-renderer-v8/src/context_bootstrap/event_template.rs @@ -605,11 +605,6 @@ struct DocumentEventTemplateMethodsDeclaration { get_selection: (), } - - - - - struct EventTemplateDeclaration { attributes: &'static [&'static str], install: for<'s, 'p> fn(&mut v8::PinScope<'s, 'p, ()>, v8::Local<'s, v8::FunctionTemplate>), diff --git a/moli-renderer-v8/src/context_bootstrap/events.rs b/moli-renderer-v8/src/context_bootstrap/events.rs index 751535c515..2fca1884e4 100644 --- a/moli-renderer-v8/src/context_bootstrap/events.rs +++ b/moli-renderer-v8/src/context_bootstrap/events.rs @@ -696,7 +696,4 @@ pub(crate) use wrappers::{ new_event_state, new_event_wrapper, set_event_private_value, }; -pub(in crate::context_bootstrap) use message::message_event_init_callback; -pub(in crate::context_bootstrap) use wrappers::event_value_attribute_getter; - pub(crate) use subclasses::construct_original_error_event; diff --git a/moli-renderer-v8/src/script_vm/eval_exec.rs b/moli-renderer-v8/src/script_vm/eval_exec.rs index b7afec1eff..a451a14255 100644 --- a/moli-renderer-v8/src/script_vm/eval_exec.rs +++ b/moli-renderer-v8/src/script_vm/eval_exec.rs @@ -381,7 +381,7 @@ impl ScriptVm { source, provenance: None, line_offset: 0, - script_nonce: None, + script_fetch_metadata: None, drain_microtasks: true, }; let pending = self @@ -392,7 +392,9 @@ impl ScriptVm { Ok(()) } Err(RawScriptExecutionError::Exception { report, .. }) => { - self.report_classic_script_exception_and_finish_evaluation_best_effort(&report); + self.report_classic_script_exception_and_finish_evaluation_best_effort( + &report, false, + ); Ok(()) } Err(error) => Err(error.into_anyhow()),