From a17d398989b9606e4fdc188cb5988cd669ce5edd Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 14 Aug 2019 14:55:35 +0200 Subject: [PATCH] deps: V8: cherry-pick e3d7f8a Original commit message: [build] update gen-postmortem-metadata for Python 3 This change makes the code compatible with both Python 2 and Python 3. Change-Id: I99d68af9c3163607c3a2fdbafac339a98b7471e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751331 Commit-Queue: Yang Guo Reviewed-by: Yang Guo Cr-Commit-Position: refs/heads/master@{#63207} Refs: https://github.com/v8/v8/commit/e3d7f8a58887d25919641757a91345c56dda2a52 PR-URL: https://github.com/nodejs/node/pull/29105 Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: Rich Trott --- common.gypi | 2 +- deps/v8/tools/gen-postmortem-metadata.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/common.gypi b/common.gypi index ca0a986bc4f8f4..6c4b04d7d06ecc 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.14', + 'v8_embedder_string': '-node.15', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py index 20215ed2fe4fb4..02b08735980693 100644 --- a/deps/v8/tools/gen-postmortem-metadata.py +++ b/deps/v8/tools/gen-postmortem-metadata.py @@ -640,9 +640,7 @@ def emit_config(): out.write('/* class type information */\n'); consts = []; - keys = typeclasses.keys(); - keys.sort(); - for typename in keys: + for typename in sorted(typeclasses): klass = typeclasses[typename]; consts.append({ 'name': 'type_%s__%s' % (klass, typename), @@ -653,9 +651,7 @@ def emit_config(): out.write('/* class hierarchy information */\n'); consts = []; - keys = klasses.keys(); - keys.sort(); - for klassname in keys: + for klassname in sorted(klasses): pklass = klasses[klassname]['parent']; bklass = get_base_class(klassname); if (bklass != 'Object'):