Skip to content

Commit

Permalink
malte's pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou committed Sep 27, 2016
1 parent 42b36cb commit 8f1690c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Binary file modified build-system/runner/dist/runner.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.javascript.jscomp.CheckLevel;
import com.google.javascript.jscomp.CommandLineRunner;
import com.google.javascript.jscomp.CompilerOptions;
import com.google.javascript.jscomp.CustomPassExecutionTime;
Expand Down Expand Up @@ -69,8 +68,6 @@ protected AmpCommandLineRunner(String[] args) {
}
CompilerOptions options = super.createOptions();
options.setCollapseProperties(true);
// Warn on improper uses of `this` that `collapseProperties` assumes.
options.setCheckGlobalThisLevel(CheckLevel.WARNING);
AmpPass ampPass = new AmpPass(getCompiler(), is_production_env, suffixTypes, assignmentReplacements);
options.addCustomPass(CustomPassExecutionTime.BEFORE_OPTIMIZATIONS, ampPass);
options.setDevirtualizePrototypeMethods(true);
Expand Down
8 changes: 7 additions & 1 deletion build-system/tasks/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ function compile(entryModuleFilenames, outputDir,
// it won't do strict type checking if its whitespace only.
compilerOptions.compilerFlags.define.push('TYPECHECK_ONLY=true');
compilerOptions.compilerFlags.jscomp_error.push(
'checkTypes', 'accessControls', 'const', 'constantProperty');
'checkTypes',
'accessControls',
'const',
'constantProperty',
// Check for dangerous uses of `this` when collapsing properties.
'globalThis'
);
}
if (argv.pseudo_names) {
compilerOptions.compilerFlags.define.push('PSEUDO_NAMES=true');
Expand Down

0 comments on commit 8f1690c

Please sign in to comment.