aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/servoparser/mod.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2023-02-18 14:07:36 -0500
committerJosh Matthews <josh@joshmatthews.net>2023-05-20 14:30:22 -0400
commit864e072d5cd86c798349a69cbd9a352bd122aa73 (patch)
tree5d72a395d1af0375496b9242c5552835185752ed /components/script/dom/servoparser/mod.rs
parent9ea1399c306af8f212e81c3dedd9601aa4fe821f (diff)
downloadservo-864e072d5cd86c798349a69cbd9a352bd122aa73.tar.gz
servo-864e072d5cd86c798349a69cbd9a352bd122aa73.zip
Enter realms more consistently during the script event loop.
Diffstat (limited to 'components/script/dom/servoparser/mod.rs')
-rw-r--r--components/script/dom/servoparser/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 9967da64556..6b5df0e9768 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -34,6 +34,7 @@ use crate::dom::processinginstruction::ProcessingInstruction;
use crate::dom::text::Text;
use crate::dom::virtualmethods::vtable_for;
use crate::network_listener::PreInvoke;
+use crate::realms::enter_realm;
use crate::script_thread::ScriptThread;
use content_security_policy::{self as csp, CspList};
use dom_struct::dom_struct;
@@ -828,6 +829,8 @@ impl FetchResponseListener for ParserContext {
return;
}
+ let _realm = enter_realm(&*parser.document);
+
parser.document.set_csp_list(csp_list);
self.parser = Some(Trusted::new(&*parser));
self.submit_resource_timing();