mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +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() {
|
||||
script.execute();
|
||||
self.pending_parsing_blocking_script.set(None);
|
||||
script.execute();
|
||||
return ParserBlockedByScript::Unblocked;
|
||||
}
|
||||
ParserBlockedByScript::Blocked
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue