Align executing script bailout in document.open with spec
HTMLDocumentParser::IsExecutingScript() is in fact identical to the "script nesting level is greater than 0" check in the current HTML Standard. The removed check originated from an older version of the HTML Standard that read: > If the Document has an active parser that isn't a script-created > parser, and the insertion point associated with that parser's input > stream is not undefined (that is, it does point to somewhere in the > input stream), then the method does nothing. but that was changed after [1]/[2] to the current text which covers strictly more cases. Indeed, in the current coverage report the removed check is never true [3]. The check is expected to stay in its current form in the upcoming document.open() overhaul. [1]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17869 [2]: https://github.com/whatwg/html/commit/7b0112bbfb4923e8f64b0fd1c66d14fbd526fc33 [3]: https://chromium-coverage.appspot.com/reports/577000/linux/chromium/src/third_party/blink/renderer/core/dom/document.cc.html#L3048 Bug: 866274 Change-Id: I5f4547ee62efe45a9831c003854279b3490a08f1 Reviewed-on: https://chromium-review.googlesource.com/1146202Reviewed-by:Hayato Ito <hayato@chromium.org> Reviewed-by:
Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#579290}
Showing
Please register or sign in to comment