aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/servoparser/mod.rs3
-rw-r--r--components/script/script_thread.rs1
2 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 6b5df0e9768..c4b52a038ea 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -919,6 +919,7 @@ impl FetchResponseListener for ParserContext {
if parser.aborted.get() {
return;
}
+ let _realm = enter_realm(&*parser);
parser.parse_bytes_chunk(payload);
}
@@ -934,6 +935,8 @@ impl FetchResponseListener for ParserContext {
return;
}
+ let _realm = enter_realm(&*parser);
+
match status {
// are we throwing this away or can we use it?
Ok(_) => (),
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 325944d33c2..96ea03881d4 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1649,6 +1649,7 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end step 6
let mut docs = self.docs_with_no_blocking_loads.borrow_mut();
for document in docs.iter() {
+ let _realm = enter_realm(&**document);
document.maybe_queue_document_completion();
}
docs.clear();