From c6f2332af7e99043bddb78714475db04862c651c Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Tue, 20 Apr 2021 13:30:33 +0200 Subject: [PATCH] Add gn flag for enabling javascript promise hooks Change-Id: Iae17977cec9520cf0194b5686ec31f0501f866f1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2839556 Auto-Submit: Jochen Eisinger Commit-Queue: Camillo Bruni Reviewed-by: Camillo Bruni Cr-Commit-Position: refs/heads/master@{#74063} --- BUILD.gn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index c7edee28e5..73c7d2b593 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -309,6 +309,9 @@ declare_args() { # Enable map packing & unpacking (sets -dV8_MAP_PACKING). v8_enable_map_packing = false + + # Allow for JS promise hooks (instead of just C++). + v8_allow_javascript_in_promise_hooks = false } # Derived defaults. @@ -837,6 +840,9 @@ config("features") { if (v8_dict_property_const_tracking) { defines += [ "V8_DICT_PROPERTY_CONST_TRACKING" ] } + if (v8_allow_javascript_in_promise_hooks) { + defines += [ "V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS" ] + } } config("toolchain") {