Skip to content

Commit 43c5b91

Browse files
sam-githubMylesBorins
authored andcommitted
deps: V8: cherry-pick 35c6d4d
Original commit message: Make code generator python3.7 compatible (async keyword). Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109 Fixes: #29548 Refs: - #29548 (comment) - #29520 - #29340 - https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351 - https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a Backport-PR-URL: #30109 PR-URL: #29585 Refs: #29520 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 23271dd commit 43c5b91

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.10',
41+
'v8_embedder_string': '-node.11',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/third_party/inspector_protocol/code_generator.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def json_object_hook(object_dict):
4343
items = [(k, os.path.join(output_base, v) if k == "output" else v)
4444
for (k, v) in items]
4545
keys, values = list(zip(*items))
46+
# 'async' is a keyword since Python 3.7.
47+
# Avoid namedtuple(rename=True) for compatibility with Python 2.X.
48+
keys = tuple('async_' if k == 'async' else k for k in keys)
4649
return collections.namedtuple('X', keys)(*values)
4750
return json.loads(data, object_hook=json_object_hook)
4851

@@ -555,7 +558,7 @@ def is_async_command(self, domain, command):
555558
if not self.config.protocol.options:
556559
return False
557560
return self.check_options(self.config.protocol.options, domain, command,
558-
"async", None, False)
561+
"async_", None, False)
559562

560563
def is_exported(self, domain, name):
561564
if not self.config.protocol.options:

0 commit comments

Comments
 (0)