diff options
author | Ole André Vadla Ravnås <oleavr@gmail.com> | 2020-11-06 04:46:17 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-04-11 13:29:21 +0300 |
commit | 507c2f2101a9a99773088ebbae368ab48a1974dc (patch) | |
tree | 26f70e8cac313f1720d4e029126e9bb4310b9c02 /deps | |
parent | 31f8610a0266cfcdb0b08abab0409c59f19497ed (diff) |
deps: V8: cherry-pick 086eecbd96b6
Original commit message:
[platform] Add Permission::kNoAccessWillJitLater enum value
This value is unused for now. This CL is part 1 of a 3-step dance.
Part 2 will be teaching Chrome's Platform implementation to accept
the new value. Part 3 will then actually use it in V8.
Bug: chromium:1117591
Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70335}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/include/v8-platform.h | 8 | ||||
-rw-r--r-- | deps/v8/test/unittests/heap/unmapper-unittest.cc | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index bf474f26803..dfb9442f579 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -338,7 +338,13 @@ class PageAllocator { kReadWrite, // TODO(hpayer): Remove this flag. Memory should never be rwx. kReadWriteExecute, - kReadExecute + kReadExecute, + // Set this when reserving memory that will later require kReadWriteExecute + // permissions. The resulting behavior is platform-specific, currently + // this is used to set the MAP_JIT flag on Apple Silicon. + // TODO(jkummerow): Remove this when Wasm has a platform-independent + // w^x implementation. + kNoAccessWillJitLater }; /** diff --git a/deps/v8/test/unittests/heap/unmapper-unittest.cc b/deps/v8/test/unittests/heap/unmapper-unittest.cc index cd1344f8098..ffcd94a2154 100644 --- a/deps/v8/test/unittests/heap/unmapper-unittest.cc +++ b/deps/v8/test/unittests/heap/unmapper-unittest.cc @@ -169,6 +169,7 @@ class TrackingPageAllocator : public ::v8::PageAllocator { os << " page: [" << start << ", " << end << "), access: "; switch (access) { case PageAllocator::kNoAccess: + case PageAllocator::kNoAccessWillJitLater: os << "--"; break; case PageAllocator::kRead: |