Commit 46fcf131 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

Roll third_party/closure_compiler to v20200112

chrome.js: 816824e445eb7ccc97becd07bdaf638d71b2e543 -> e39fdb69b20d4daad90102ed2944de16874243cf
chrome_extensions.js: 5a25bfc4e006f1a965d362e27938611242908acd -> 5be5a82b4b4ef357928edfe3608bb06249114fa4

The chrome.js and chrome_extensions.js files mentioned above were
already updated in r733877 to unblock further work, mentioned here
for completeness.

Other fixes:
 - Remove obsolete diagnostic group 'ambiguousFunctionDecl', as of
   https://github.com/google/closure-compiler/commit/391c6c47f8089870fe89839521c0b135051cedf7.
 - Remove cr.exportPath() tests, since cr.exportPath() is no longer
   part of --chrome_pass, as of
   https://github.com/google/closure-compiler/commit/9ef4f419f8909829be9482fe108c6d70cb30dff1
 - Fix new "variable goog is undeclared" errors in iOS and compiler_test.py
 - Fix incorrect usage of a generic type in ui/file_manager
 - Fix newly found type violations in internet_detail_page.js

Bug: 1028829,1044378
Change-Id: I0028085c825790b03036793bcae81767d60cf738
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013749Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarDan Beam <dbeam@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735203}
parent 812b6f89
......@@ -915,10 +915,12 @@ Polymer({
continue;
}
if ('activeValue' in value) {
if (this.isNetworkPolicyRecommended(value)) {
if (this.isNetworkPolicyRecommended(
/** @type {!OncMojo.ManagedProperty} */ (value))) {
return true;
}
} else if (this.hasRecommendedFields_(value)) {
} else if (this.hasRecommendedFields_(
/** @type {!mojom.ManagedProperties} */ (value))) {
return true;
}
}
......
......@@ -134,7 +134,6 @@ template("js_compile_checked") {
"--jscomp_error=missingProperties",
"--jscomp_error=undefinedVars",
"--jscomp_error=accessControls",
"--jscomp_error=ambiguousFunctionDecl",
"--jscomp_error=constantProperty",
"--jscomp_error=deprecated",
"--jscomp_error=externsValidation",
......
......@@ -8,6 +8,7 @@
// this.style because member identifiers are minified by default.
// See http://goo.gl/FwOgy
var goog;
goog.provide('__crWeb.base');
// This object is checked on the main app to know when to inject (or not).
......
Name: Closure compiler
Short Name: closure-compiler
URL: http://github.com/google/closure-compiler
Version: v20190929
Date: 2019/10/07 21:43
Version: v20200112
Date: 2020/01/21 23:27
License: Apache 2.0
License File: LICENSE
Security Critical: no
......
......@@ -4,7 +4,6 @@
strict_error_checking_closure_args = [
"jscomp_error=accessControls",
"jscomp_error=ambiguousFunctionDecl",
"jscomp_error=checkTypes",
"jscomp_error=checkVars",
"jscomp_error=constantProperty",
......
......@@ -302,6 +302,7 @@ var testScript = function() {
source_file1 = tempfile.NamedTemporaryFile(delete=False)
with open(source_file1.name, "w") as f:
f.write("""
var goog;
goog.provide('testScript');
var testScript = function() {};
......@@ -326,27 +327,11 @@ testScript();
self.assertFalse(found_errors,
msg="Expected success, but got failure\n\nOutput:\n%s\n" % stderr)
expected_output = "'use strict';var testScript=function(){};testScript();\n"
expected_output = "'use strict';var goog,testScript=function(){};testScript();\n"
self.assertTrue(os.path.exists(out_file))
with open(out_file, "r") as file:
self.assertEquals(file.read(), expected_output)
# TODO(crbug.com/1028829): remove this when cr.exportPath() is removed from
# --chrome_pass.
def testExportPath(self):
self._runCompilerTestExpectSuccess(self._CR_DEFINE_DEFINITION +
"cr.exportPath('a.b.c');");
def testExportPathWithTargets(self):
self._runCompilerTestExpectSuccess(self._CR_DEFINE_DEFINITION +
"var path = 'a.b.c'; cr.exportPath(path, {}, {});")
def testExportPathNoPath(self):
self._runCompilerTestExpectError(self._CR_DEFINE_DEFINITION +
"cr.exportPath();",
"ERROR - [JSC_CR_EXPORT_PATH_TOO_FEW_ARGUMENTS] cr.exportPath() should"
" have at least 1 argument: path name")
def testMissingReturnAssertNotReached(self):
template = self._ASSERT_DEFINITION + """
/** @enum {number} */
......
......@@ -36,7 +36,7 @@ class MetadataModel {
/** @private @const {!MetadataProviderCache} */
this.cache_ = new MetadataProviderCache();
/** @private @const {!Array<!MetadataProviderCallbackRequest<T>>} */
/** @private @const {!Array<!MetadataProviderCallbackRequest>} */
this.callbackRequests_ = [];
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment