fix(renderer): adapt main fetch and document-start changes

This commit is contained in:
ldm0
2026-10-11 18:06:48 +08:00
parent ebc60d0833
commit 3878ca8f82
5 changed files with 5 additions and 19 deletions
-8
View File
@@ -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"]
@@ -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}");
@@ -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>),
@@ -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;
+4 -2
View File
@@ -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()),