Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > f5a2d348875a82e92e9aab3aebacb9c1 > files > 32

chromium-browser-stable-78.0.3904.87-1.mga7.src.rpm

--- chromium-72.0.3626.81/third_party/closure_compiler/compiler.py.system-closure-compiler	2019-02-02 15:20:50.585588933 +0100
+++ chromium-72.0.3626.81/third_party/closure_compiler/compiler.py	2019-02-02 15:21:12.782207970 +0100
@@ -38,7 +38,6 @@ class Checker(object):
     Args:
       verbose: Whether this class should output diagnostic messages.
     """
-    self._compiler_jar = os.path.join(_CURRENT_DIR, "compiler", "compiler.jar")
     self._target = None
     self._temp_files = []
     self._verbose = verbose
@@ -70,19 +69,18 @@ class Checker(object):
     """
     print >> sys.stderr, "(ERROR) %s" % msg
 
-  def run_jar(self, jar, args):
-    """Runs a .jar from the command line with arguments.
+  def run_compiler(self, args):
+    """Runs the closure compiler from the command line with arguments.
 
     Args:
-      jar: A file path to a .jar file
-      args: A list of command line arguments to be passed when running the .jar.
+      args: A list of command line arguments to be passed when running the compiler
 
     Return:
       (exit_code, stderr) The exit code of the command (e.g. 0 for success) and
-          the stderr collected while running |jar| (as a string).
+          the stderr collected while running (as a string).
     """
-    shell_command = " ".join(self._JAR_COMMAND + [jar] + args)
-    self._log_debug("Running jar: %s" % shell_command)
+    shell_command = " ".join(["/usr/bin/closure-compiler"] + args)
+    self._log_debug("Running: %s" % shell_command)
 
     devnull = open(os.devnull, "w")
     kwargs = {"stdout": devnull, "stderr": subprocess.PIPE, "shell": True}
@@ -242,7 +240,7 @@ class Checker(object):
 
     self._log_debug("Args: %s" % " ".join(args))
 
-    return_code, stderr = self.run_jar(self._compiler_jar, args)
+    return_code, stderr = self.run_compiler(args)
 
     errors = stderr.strip().split("\n\n")
     maybe_summary = errors.pop()
--- chromium-72.0.3626.81/third_party/closure_compiler/js_binary.py.system-closure-compiler	2019-01-30 02:18:46.000000000 +0100
+++ chromium-72.0.3626.81/third_party/closure_compiler/js_binary.py	2019-02-02 15:51:01.962623818 +0100
@@ -81,8 +81,6 @@ def CrawlRootDepsTree(deps, target_sourc
 
 def main():
   parser = argparse.ArgumentParser()
-  parser.add_argument('-c', '--compiler', required=True,
-                      help='Path to compiler')
   parser.add_argument('-s', '--sources', nargs='*', default=[],
                       help='List of js source files')
   parser.add_argument('-o', '--output', required=True,
@@ -121,7 +119,7 @@ def main():
     compiler_args += ['--checks-only']
     open(args.output, 'w').close()
 
-  returncode, errors = compiler.Compiler().run_jar(args.compiler, compiler_args)
+  returncode, errors = compiler.Compiler().run_compiler(compiler_args)
   if returncode != 0:
     print errors
 
--- chromium-73.0.3683.75/third_party/closure_compiler/compile_js.gni.system-closure-compiler	2019-03-11 23:01:15.000000000 +0100
+++ chromium-73.0.3683.75/third_party/closure_compiler/compile_js.gni	2019-03-16 21:33:28.185253841 +0100
@@ -6,7 +6,6 @@ import("//third_party/closure_compiler/c
 import("//ui/webui/webui_features.gni")
 
 script_path = "//third_party/closure_compiler"
-compiler_path = "$script_path/compiler/compiler.jar"
 externs_path = "$script_path/externs"
 interfaces_path = "$script_path/interfaces"
 chrome_externs = "$externs_path/chrome.js"
@@ -166,17 +165,12 @@ template("js_binary") {
                              "sources",
                              "testonly",
                            ])
-    args = [
-      "--compiler",
-      rebase_path(compiler_path, root_build_dir),
-    ]
-
     if (!defined(outputs)) {
       outputs = [
         "$target_gen_dir/$target_name.js",
       ]
     }
-    args += [ "--output" ] + rebase_path(outputs, root_build_dir)
+    args = [ "--output" ] + rebase_path(outputs, root_build_dir)
 
     if (!defined(sources)) {
       sources = [
@@ -234,7 +228,6 @@ template("js_binary") {
     inputs = [
       "$script_path/closure_args.gni",
       chrome_externs,
-      compiler_path,
     ]
 
     # |polymer_externs| should only be added for Polymer versions 1 and 2. For