WebUI: Provide a way to opt-out of --chrome_pass in js_type_check()
The --chrome_pass Closure compiler flag is only needed for code that relies on cr.js (cr.define(), cr.exportPath() and friends). For JS code that has migrated to JS modules --chrome_pass is not necessary. Explicitly removing --chrome_pass not only makes type-checking faster, but also ensures that eventually we don't depend on this pass at all. Note that using |is_polymer3| also opts out a js_type_check() target from --chrome_pass, but without the new |uses_js_modules| there is no easy way for non-Polymer code to opt-out. Note: With this change any JS code that uses JS modules must specify either |uses_js_modules| or |is_polymer3| attributes. Bug: 1028829 Change-Id: I4e019770e36ac460402123c5413be6c95e32fef2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1938248Reviewed-by:Rebekah Potter <rbpotter@chromium.org> Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#720597}
Showing
Please register or sign in to comment