DescriptionParser: Make skipping HTML comments optional.
API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources.
(That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.)
The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes.
BUG=chromium:573887
LOG=Y
Committed: https://crrev.com/91d344288aa51ed03eaaa1cb3e368ac1e82f0173
Cr-Commit-Position: refs/heads/master@{#34904}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Cleanly expose the decision at the API. #
Total comments: 2
Patch Set 3 : Removed prefix; set default only on v8::ScriptOrigin constructor. #
Total comments: 2
Patch Set 4 : Andreas' feedback: [skip|ignore] -> allow #Patch Set 5 : Clearer comment. #Patch Set 6 : Rebase. #
Messages
Total messages: 29 (12 generated)
|