From cac4da05ad91f12c1af97895b3a08e3190f6a97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 8 Mar 2018 10:19:35 +0100 Subject: [PATCH] deps: allow disabling V8 untrusted code mitigations Add a GYP flag similar to the one defined in BUILD.gn. PR-URL: https://github.com/nodejs/node/pull/19222 Reviewed-By: Fedor Indutny Reviewed-By: Yang Guo Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Benedikt Meurer Reviewed-By: Gus Caplan Reviewed-By: Gibson Fahnestock --- common.gypi | 2 +- deps/v8/gypfiles/features.gypi | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index a3aeff7e03d..b2fa7874c26 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,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.4', + 'v8_embedder_string': '-node.5', # 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 d285ee21da5..8c99b4f0866 100644 --- a/deps/v8/gypfiles/features.gypi +++ b/deps/v8/gypfiles/features.gypi @@ -89,6 +89,9 @@ # Controls the threshold for on-heap/off-heap Typed Arrays. 'v8_typed_array_max_size_in_heap%': 64, + + # Enable mitigations for executing untrusted code. + 'v8_untrusted_code_mitigations%': 'true', }, 'target_defaults': { 'conditions': [ @@ -143,6 +146,9 @@ ['v8_enable_concurrent_marking==1', { 'defines': ['V8_CONCURRENT_MARKING',], }], + ['v8_untrusted_code_mitigations=="false"', { + 'defines': ['DISABLE_UNTRUSTED_CODE_MITIGATIONS',], + }], ], # conditions 'configurations': { 'DebugBaseCommon': {