Use IsInDocumentWrite() at the time of PrepareScript() instead of element creation
ScriptLoader and related classes use two document.write()-related flags: - Document::IsInDocumentWrite() at the time of PrepareScript(): directly checked within PrepareScript() and used for multiple purposes. - Document::IsInDocumentWrite() at the time of <script> element creation: plumbed from HTML parser to ScriptLoader::created_during_document_write_ and used for DocumentParserTiming. This CL merges the latter into the former: - Moves ScriptLoader::created_during_document_write_ to PendingScript::created_during_document_write_ which is set to IsInDocumentWrite() at the time of PendingScript creation, which is within PrepareScript(), and - Removes the plumbing of the flag from the HTML parser to ScriptLoader. Thus this CL simplifies the code by reducing plumbing through ScriptLoader constructor. Bug: 842349 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I2b17dd098bb134a59b9c1ba2937c74bfa46b4c0f Reviewed-on: https://chromium-review.googlesource.com/1053163 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#560739}
Showing
Please register or sign in to comment