Skip to content

Commit

Permalink
Combine isFunctionCallThatAlwaysThrows with ClosureCodingConvention
Browse files Browse the repository at this point in the history
R=fukino@chromium.org
BUG=none
TEST=compiler_tests.py

Review URL: https://codereview.chromium.org/1416333003 .

Cr-Commit-Position: refs/heads/master@{#355924}
  • Loading branch information
danbeam committed Oct 23, 2015
1 parent 6fb48a9 commit 0680a86
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
Binary file modified third_party/closure_compiler/compiler/compiler.jar
Binary file not shown.
Binary file modified third_party/closure_compiler/runner/runner.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,9 @@ public Collection<AssertionFunctionSpec> getAssertionFunctions() {
);
}

// TODO(dbeam): combine this with ClosureCodingConvention?
@Override
public boolean isFunctionCallThatAlwaysThrows(Node n) {
if (n.isExprResult()) {
if (!n.getFirstChild().isCall()) {
return false;
}
} else if (!n.isCall()) {
return false;
}
if (n.isExprResult()) {
n = n.getFirstChild();
}
// n is a call
return n.getFirstChild().matchesQualifiedName("assertNotReached");
return CodingConventions.defaultIsFunctionCallThatAlwaysThrows(
n, "assertNotReached");
}
}

0 comments on commit 0680a86

Please sign in to comment.