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:
Josh Matthews 2015-12-31 11:16:09 -05:00
parent fbae86281d
commit b7bff424da

View file

@ -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