[heap] Update CodePageCollectionMemoryModificationScope docs

The scope can be (and is) used by compiler threads, i.e. not just by the
main thread; update the comment.

Change-Id: Ifbeb414761cee4ab12dd953f0cd544f35c92fc8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516037
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79445}
This commit is contained in:
Jakob Gruber 2022-03-10 14:27:05 +01:00 committed by V8 LUCI CQ
parent ba4326fe19
commit 6f082e305b
2 changed files with 3 additions and 4 deletions

View File

@ -2542,7 +2542,7 @@ void Heap::MarkCompact() {
SetGCState(MARK_COMPACT);
PROFILE(isolate_, CodeMovingGCEvent());
CodeSpaceMemoryModificationScope code_modifcation(this);
CodeSpaceMemoryModificationScope code_modification(this);
// Disable soft allocation limits in the shared heap, if one exists, as
// promotions into the shared heap should always succeed.

View File

@ -2559,9 +2559,8 @@ class V8_NODISCARD CodeSpaceMemoryModificationScope {
Heap* heap_;
};
// The CodePageCollectionMemoryModificationScope can only be used by the main
// thread. It will not be enabled if a CodeSpaceMemoryModificationScope is
// already active.
// The CodePageCollectionMemoryModificationScope can be used by any thread. It
// will not be enabled if a CodeSpaceMemoryModificationScope is already active.
class V8_NODISCARD CodePageCollectionMemoryModificationScope {
public:
explicit inline CodePageCollectionMemoryModificationScope(Heap* heap);