From 3b66a8d8934eec18e4cd4f893eda2e0d4205d75c Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 21 Oct 2018 09:04:43 -0400 Subject: [PATCH] deps: fix wrong default for v8 handle zapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23801 Fixes: https://github.com/nodejs/node/issues/23796 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Matheus Marchini --- common.gypi | 2 +- deps/v8/gypfiles/features.gypi | 11 +++++++---- deps/v8/gypfiles/toolchain.gypi | 6 ++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index 50f69563be6d93..1508097e1d2a44 100644 --- a/common.gypi +++ b/common.gypi @@ -33,7 +33,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.5', + 'v8_embedder_string': '-node.6', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/gypfiles/features.gypi b/deps/v8/gypfiles/features.gypi index 35a078e8af2fd2..618949124a71cb 100644 --- a/deps/v8/gypfiles/features.gypi +++ b/deps/v8/gypfiles/features.gypi @@ -103,7 +103,9 @@ # Enable mitigations for executing untrusted code. 'v8_untrusted_code_mitigations%': 'true', - 'v8_enable_handle_zapping%': 1, + # Currently set for node by common.gypi, avoiding default because of gyp file bug. + # Should be turned on only for debugging. + #'v8_enable_handle_zapping%': 0, }, 'target_defaults': { 'conditions': [ @@ -164,9 +166,10 @@ ['v8_untrusted_code_mitigations=="false"', { 'defines': ['DISABLE_UNTRUSTED_CODE_MITIGATIONS',], }], - ['v8_enable_handle_zapping==1', { - 'defines': ['ENABLE_HANDLE_ZAPPING',], - }], + # Refs: https://github.com/nodejs/node/pull/23801 + # ['v8_enable_handle_zapping==1', { + # 'defines': ['ENABLE_HANDLE_ZAPPING',], + # }], ], # conditions 'defines': [ 'V8_GYP_BUILD', diff --git a/deps/v8/gypfiles/toolchain.gypi b/deps/v8/gypfiles/toolchain.gypi index 7f497fac91e2b2..ea8f1c2f00da56 100644 --- a/deps/v8/gypfiles/toolchain.gypi +++ b/deps/v8/gypfiles/toolchain.gypi @@ -1321,6 +1321,10 @@ }, { 'inherit_from': ['DebugBase1'], }], + # Temporary refs: https://github.com/nodejs/node/pull/23801 + ['v8_enable_handle_zapping==1', { + 'defines': ['ENABLE_HANDLE_ZAPPING',], + }], ], }, # Debug 'ReleaseBase': { @@ -1405,6 +1409,8 @@ }, # Release 'Release': { 'inherit_from': ['ReleaseBase'], + # Temporary refs: https://github.com/nodejs/node/pull/23801 + 'defines!': ['ENABLE_HANDLE_ZAPPING',], }, # Debug 'conditions': [ [ 'OS=="win"', {