mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Reorder marking of pending parser-blocking scripts to avoid reentrancy.
In cases where a pending parser-blocking script is executing, if the script caused another load to complete (eg. by removing a pending iframe from the DOM, thus terminating the load) then the currently-executing script would attempt to execute itself again.
This commit is contained in:
parent
fbae86281d
commit
b7bff424da
1 changed files with 1 additions and 1 deletions
|
@ -1296,8 +1296,8 @@ impl Document {
|
||||||
};
|
};
|
||||||
|
|
||||||
if self.script_blocking_stylesheets_count.get() == 0 && script.is_ready_to_be_executed() {
|
if self.script_blocking_stylesheets_count.get() == 0 && script.is_ready_to_be_executed() {
|
||||||
script.execute();
|
|
||||||
self.pending_parsing_blocking_script.set(None);
|
self.pending_parsing_blocking_script.set(None);
|
||||||
|
script.execute();
|
||||||
return ParserBlockedByScript::Unblocked;
|
return ParserBlockedByScript::Unblocked;
|
||||||
}
|
}
|
||||||
ParserBlockedByScript::Blocked
|
ParserBlockedByScript::Blocked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue