diff --git a/build/jslib/rhino/optimize.js b/build/jslib/rhino/optimize.js index 4d972df6..1f97e04e 100644 --- a/build/jslib/rhino/optimize.js +++ b/build/jslib/rhino/optimize.js @@ -78,6 +78,10 @@ define(['logger'], function (logger) { } options.prettyPrint = keepLines || options.prettyPrint; + if (config.disableGlobalThisWarning) { + options.setWarningLevel(jscomp.DiagnosticGroups.GLOBAL_THIS, jscomp.CheckLevel.OFF); + } + FLAG_compilation_level = jscomp.CompilationLevel[config.CompilationLevel || 'SIMPLE_OPTIMIZATIONS']; FLAG_compilation_level.setOptionsForCompilationLevel(options);