From 46c9194ec801f427960a270d64da1c06101dac52 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 211b418f98a38b..b5df26fd2be34f 100644 --- a/common.gypi +++ b/common.gypi @@ -39,7 +39,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.18', + 'v8_embedder_string': '-node.19', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py index 8724b988f0f2fe..ceaf7798fd32c2 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 @@ -382,7 +383,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 = ''; @@ -577,7 +578,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