Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java

Issue 473853003: Fix in compiler pass: cr.defineProperty() with 2 arguments means opt_kind == cr.PropertyKind.JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@D_define_once_rebase
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java
diff --git a/third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java b/third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java
index 436fabae734380ebfca2e21feb0400023cc9afd2..8ff3fb0a1405133424da35b7d6b6e67e5e8fc1de 100644
--- a/third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java
+++ b/third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java
@@ -120,15 +120,15 @@ public class ChromePass extends AbstractPostOrderCallback implements CompilerPas
}
private Node getTypeByCrPropertyKind(Node propertyKind) {
+ if (propertyKind == null || propertyKind.matchesQualifiedName("cr.PropertyKind.JS")) {
+ return new Node(Token.QMARK);
+ }
if (propertyKind.matchesQualifiedName("cr.PropertyKind.ATTR")) {
return IR.string("string");
}
if (propertyKind.matchesQualifiedName("cr.PropertyKind.BOOL_ATTR")) {
return IR.string("boolean");
}
- if (propertyKind.matchesQualifiedName("cr.PropertyKind.JS")) {
- return new Node(Token.QMARK);
- }
compiler.report(JSError.make(propertyKind, CR_DEFINE_PROPERTY_INVALID_PROPERTY_KIND,
propertyKind.getQualifiedName()));
return null;
« no previous file with comments | « no previous file | third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698