enhance: Add support for unsafe-eval and wasm-unsafe-eval (#32893)

Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
This commit is contained in:
Chocolate Pie 2024-08-02 02:26:44 +09:00 committed by GitHub
parent 2cf207ddc8
commit 92866ab911
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 755 additions and 73 deletions

View file

@ -3672,6 +3672,8 @@ impl ScriptThread {
.and_then(|h| h.typed_get::<ReferrerPolicyHeader>())
.map(ReferrerPolicy::from);
let status_code = metadata.status.map(|status| status.0).unwrap_or(200);
let document = Document::new(
&window,
HasBrowsingContext::Yes,
@ -3685,6 +3687,7 @@ impl ScriptThread {
loader,
referrer,
referrer_policy,
Some(status_code),
incomplete.canceller,
);
document.set_ready_state(DocumentReadyState::Loading);