Enter realms when creating special same-origin iframes.

This commit is contained in:
Josh Matthews 2023-05-20 18:32:08 -04:00
parent 02a280dbe1
commit dcf02caf81
2 changed files with 4 additions and 0 deletions

View file

@ -919,6 +919,7 @@ impl FetchResponseListener for ParserContext {
if parser.aborted.get() { if parser.aborted.get() {
return; return;
} }
let _realm = enter_realm(&*parser);
parser.parse_bytes_chunk(payload); parser.parse_bytes_chunk(payload);
} }
@ -934,6 +935,8 @@ impl FetchResponseListener for ParserContext {
return; return;
} }
let _realm = enter_realm(&*parser);
match status { match status {
// are we throwing this away or can we use it? // are we throwing this away or can we use it?
Ok(_) => (), Ok(_) => (),

View file

@ -1649,6 +1649,7 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end step 6 // https://html.spec.whatwg.org/multipage/#the-end step 6
let mut docs = self.docs_with_no_blocking_loads.borrow_mut(); let mut docs = self.docs_with_no_blocking_loads.borrow_mut();
for document in docs.iter() { for document in docs.iter() {
let _realm = enter_realm(&**document);
document.maybe_queue_document_completion(); document.maybe_queue_document_completion();
} }
docs.clear(); docs.clear();