Remove DCHECK()s in ExecuteScriptsWaitingForLoad()
Previously, HTMLParserScriptRunner::ExecuteScriptsWaitingForLoad() required the given PendingScript is still the valid ParserBlockingScript(). However, this isn't the case when HTMLParserScriptRunner::ExecuteParsingBlockingScripts() is called after PendingScriptFinished() before NotifyScriptLoaded(), because the PendingScript is already evaluated and is no longer parser blocking. This CL allows ExecuteScriptsWaitingForLoad() to be called even when the finished PendingScript doesn't match with ParserBlockingScript() or even when there are no longer ParserBlockingScript(), by removing DCHECK()s and |pending_script| argument. This is safe because: - All necessary conditions for evaluation is checked in ExecuteParsingBlockingScripts(), and extra stale calls to ExecuteParsingBlockingScripts() (i.e. called when parser blocking scripts are not ready) are ignored. - |pending_script| hasn't been used other than for DCHECK()s. Bug: 1093051 Change-Id: I921f8d8f1fc261547fa214822f75341de03c8cba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239770 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#789864}
Showing
Please register or sign in to comment