From ad4e217e5356537290536b70ae7ec03fb4ec2a9c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 3 Nov 2019 17:09:54 +0100 Subject: [PATCH] deps: V8: cherry-pick a7dffcd767be MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [postmortem] Load files using utf-8 to support Python 3 Change-Id: I174d38cc33210c07d1a7596627e1b2d21bb06313 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895560 Reviewed-by: Mathias Bynens Commit-Queue: Michaƫl Zasso Cr-Commit-Position: refs/heads/master@{#64717} Refs: https://github.com/v8/v8/commit/a7dffcd767be6e6122dd3911c8388b5ff76ac590 PR-URL: https://github.com/nodejs/node/pull/30218 Reviewed-By: Richard Lau Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Chengzhong Wu Reviewed-By: Joyee Cheung --- common.gypi | 2 +- deps/v8/tools/gen-postmortem-metadata.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 6c4b04d7d06ecc..b86e5e05d7df9a 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.15', + 'v8_embedder_string': '-node.16', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py index b5aba23220bac8..7d159cb84679d5 100644 --- a/deps/v8/tools/gen-postmortem-metadata.py +++ b/deps/v8/tools/gen-postmortem-metadata.py @@ -49,6 +49,7 @@ # for py2/py3 compatibility from __future__ import print_function +import io import re import sys @@ -380,7 +381,7 @@ def load_objects(): def load_objects_from_file(objfilename, checktypes): - objfile = open(objfilename, 'r'); + objfile = io.open(objfilename, 'r', encoding='utf-8'); in_insttype = False; typestr = ''; @@ -575,7 +576,7 @@ def load_fields(): def load_fields_from_file(filename): - inlfile = open(filename, 'r'); + inlfile = io.open(filename, 'r', encoding='utf-8'); # # Each class's fields and the corresponding offsets are described in the