/[packages]/cauldron/chromium-browser-stable/current/SOURCES/chromium-110-system-closure-compiler.patch
ViewVC logotype

Contents of /cauldron/chromium-browser-stable/current/SOURCES/chromium-110-system-closure-compiler.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1944039 - (show annotations) (download)
Sat Feb 18 22:41:57 2023 UTC (17 months ago) by squidf
File size: 4029 byte(s)
- New version: 110.0.5481.100
- Unbundle H264 (tainted)
- Update patches
- Fix potential crash with system ICU

1 --- chromium-72.0.3626.81/third_party/closure_compiler/compiler.py.system-closure-compiler 2019-02-02 15:20:50.585588933 +0100
2 +++ chromium-72.0.3626.81/third_party/closure_compiler/compiler.py 2019-02-02 15:21:12.782207970 +0100
3 @@ -33,7 +33,6 @@ class Compiler(object):
4 Args:
5 verbose: Whether this class should output diagnostic messages.
6 """
7 - self._compiler_jar = os.path.join(_CURRENT_DIR, "compiler", "compiler.jar")
8 self._verbose = verbose
9
10 def _log_debug(self, msg, error=False):
11 @@ -45,19 +44,19 @@ class Compiler(object):
12 if self._verbose:
13 print("(INFO) %s" % msg)
14
15 - def run_jar(self, jar, args):
16 - """Runs a .jar from the command line with arguments.
17 + def run_compiler(self, args):
18 + """Runs the closure compiler from the command line with arguments.
19
20 Args:
21 jar: A file path to a .jar file
22 - args: A list of command line arguments to be passed when running the .jar.
23 + args: A list of command line arguments to be passed when running the compiler.
24
25 Return:
26 (exit_code, stderr) The exit code of the command (e.g. 0 for success) and
27 - the stderr collected while running |jar| (as a string).
28 + the stderr collected while running (as a string).
29 """
30 - shell_command = " ".join(self._JAR_COMMAND + [jar] + args)
31 - self._log_debug("Running jar: %s" % shell_command)
32 + shell_command = " ".join(["/usr/bin/closure-compiler"] + args)
33 + self._log_debug("Running: %s" % shell_command)
34
35 devnull = open(os.devnull, "w")
36 process = subprocess.Popen(shell_command, universal_newlines=True,
37 --- chromium-97.0.4692.71_patch/third_party/closure_compiler/js_binary.py 2021-12-31 01:58:27.000000000 +0100
38 +++ chromium-97.0.4692.71_patch/third_party/closure_compiler/js_binary.py.closure_compiler 2022-01-06 10:11:57.574453660 +0100
39 @@ -83,8 +83,6 @@ def CrawlRootDepsTree(deps, target_sourc
40
41 def main():
42 parser = argparse.ArgumentParser()
43 - parser.add_argument('-c', '--compiler', required=True,
44 - help='Path to compiler')
45 parser.add_argument('-s', '--sources', nargs='*', default=[],
46 help='List of js source files')
47 parser.add_argument('-o', '--output', required=False,
48 @@ -150,9 +148,9 @@ def main():
49 compiler_args += ['--checks-only']
50 open(args.output, 'w').close()
51
52 - returncode, errors = compiler.Compiler().run_jar(args.compiler, compiler_args)
53 + returncode, errors = compiler.Compiler().run_compiler(compiler_args)
54 if returncode != 0:
55 - print(args.compiler, ' '.join(compiler_args))
56 + print(' '.join(compiler_args))
57 print(errors)
58
59 return returncode
60 --- patch110/third_party/closure_compiler/compile_js.gni 2023-02-16 15:16:19.493143800 +0100
61 +++ patch110/third_party/closure_compiler/compile_js.gni.use-system-closure-compiler 2023-02-18 22:01:45.711337048 +0100
62 @@ -12,7 +12,6 @@ declare_args() {
63 }
64
65 script_path = "//third_party/closure_compiler"
66 -compiler_path = "$script_path/compiler/compiler.jar"
67 externs_path = "$script_path/externs"
68 interfaces_path = "$script_path/interfaces"
69 chrome_externs = "$externs_path/chrome.js"
70 @@ -183,10 +182,6 @@ template("js_binary") {
71 "sources",
72 "testonly",
73 ])
74 - args = [
75 - "--compiler",
76 - rebase_path(compiler_path, root_build_dir),
77 - ]
78
79 if (!defined(outputs)) {
80 if (defined(chunks) && chunks) {
81 @@ -195,7 +190,7 @@ template("js_binary") {
82 outputs = [ "$target_gen_dir/$target_name.js" ]
83 }
84 }
85 - args += [ "--output" ] + rebase_path(outputs, root_build_dir)
86 + args = [ "--output" ] + rebase_path(outputs, root_build_dir)
87
88 if (!defined(sources)) {
89 sources = [ "$target_name.js" ]
90 @@ -262,7 +257,6 @@ template("js_binary") {
91 inputs = [
92 "$script_path/closure_args.gni",
93 chrome_externs,
94 - compiler_path,
95 ]
96
97 # |polymer_externs| should only be added for Polymer versions 1 and 2. For

  ViewVC Help
Powered by ViewVC 1.1.30