Closure-Compile mojo_bindings_lite.js with --isolation_mode=IIFE
IIFE is "Immediately Invoked Function Expression". It wraps the compiled output like (function () { <compiled code> }).call(this);. This is the recommendation given at http://go/js-practices/build-rules#use-isolation-modeiife-or-equivalent Without it, closure-compiled symbols pollute the global JS context and can prevent mojo bindings being used in a regular/standalone closure-compiled app. E.g., errors like, JS ERROR: '[..:ERROR:CONSOLE(1)] "Uncaught SyntaxError: Identifier 'ra' has already been declared" Bug: 996088 Change-Id: Icef1a1c0d14a3f2b8cefbce12e08348a8c63b9c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903228Reviewed-by:Ken Rockot <rockot@google.com> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#713629}
Showing
Please register or sign in to comment