summaryrefslogtreecommitdiff
path: root/chromium/v8/src/heap/heap-inl.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/heap/heap-inl.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/heap/heap-inl.h')
-rw-r--r--chromium/v8/src/heap/heap-inl.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/chromium/v8/src/heap/heap-inl.h b/chromium/v8/src/heap/heap-inl.h
index 39f5ec6c66e..6e42cf74527 100644
--- a/chromium/v8/src/heap/heap-inl.h
+++ b/chromium/v8/src/heap/heap-inl.h
@@ -23,7 +23,11 @@
// leak heap internals to users of this interface!
#include "src/execution/isolate-data.h"
#include "src/execution/isolate.h"
+#include "src/heap/code-object-registry.h"
+#include "src/heap/memory-allocator.h"
#include "src/heap/memory-chunk.h"
+#include "src/heap/new-spaces-inl.h"
+#include "src/heap/paged-spaces-inl.h"
#include "src/heap/read-only-spaces.h"
#include "src/heap/spaces-inl.h"
#include "src/objects/allocation-site-inl.h"
@@ -237,8 +241,7 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type,
DCHECK(!large_object);
DCHECK(CanAllocateInReadOnlySpace());
DCHECK_EQ(AllocationOrigin::kRuntime, origin);
- allocation =
- read_only_space_->AllocateRaw(size_in_bytes, alignment, origin);
+ allocation = read_only_space_->AllocateRaw(size_in_bytes, alignment);
} else {
UNREACHABLE();
}
@@ -397,7 +400,8 @@ bool Heap::InYoungGeneration(MaybeObject object) {
// static
bool Heap::InYoungGeneration(HeapObject heap_object) {
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) return false;
- bool result = MemoryChunk::FromHeapObject(heap_object)->InYoungGeneration();
+ bool result =
+ BasicMemoryChunk::FromHeapObject(heap_object)->InYoungGeneration();
#ifdef DEBUG
// If in the young generation, then check we're either not in the middle of
// GC or the object is in to-space.
@@ -425,7 +429,7 @@ bool Heap::InFromPage(MaybeObject object) {
// static
bool Heap::InFromPage(HeapObject heap_object) {
- return MemoryChunk::FromHeapObject(heap_object)->IsFromPage();
+ return BasicMemoryChunk::FromHeapObject(heap_object)->IsFromPage();
}
// static
@@ -442,7 +446,7 @@ bool Heap::InToPage(MaybeObject object) {
// static
bool Heap::InToPage(HeapObject heap_object) {
- return MemoryChunk::FromHeapObject(heap_object)->IsToPage();
+ return BasicMemoryChunk::FromHeapObject(heap_object)->IsToPage();
}
bool Heap::InOldSpace(Object object) { return old_space_->Contains(object); }
@@ -452,7 +456,7 @@ Heap* Heap::FromWritableHeapObject(HeapObject obj) {
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) {
return Heap::GetIsolateFromWritableObject(obj)->heap();
}
- MemoryChunk* chunk = MemoryChunk::FromHeapObject(obj);
+ BasicMemoryChunk* chunk = BasicMemoryChunk::FromHeapObject(obj);
// RO_SPACE can be shared between heaps, so we can't use RO_SPACE objects to
// find a heap. The exception is when the ReadOnlySpace is writeable, during
// bootstrapping, so explicitly allow this case.
@@ -540,7 +544,7 @@ void Heap::UpdateAllocationSite(Map map, HeapObject object,
PretenuringFeedbackMap* pretenuring_feedback) {
DCHECK_NE(pretenuring_feedback, &global_pretenuring_feedback_);
#ifdef DEBUG
- MemoryChunk* chunk = MemoryChunk::FromHeapObject(object);
+ BasicMemoryChunk* chunk = BasicMemoryChunk::FromHeapObject(object);
DCHECK_IMPLIES(chunk->IsToPage(),
chunk->IsFlagSet(MemoryChunk::PAGE_NEW_NEW_PROMOTION));
DCHECK_IMPLIES(!chunk->InYoungGeneration(),
@@ -709,24 +713,24 @@ CodePageMemoryModificationScope::CodePageMemoryModificationScope(Code code)
: chunk_(nullptr), scope_active_(false) {}
#else
CodePageMemoryModificationScope::CodePageMemoryModificationScope(Code code)
- : CodePageMemoryModificationScope(MemoryChunk::FromHeapObject(code)) {}
+ : CodePageMemoryModificationScope(BasicMemoryChunk::FromHeapObject(code)) {}
#endif
CodePageMemoryModificationScope::CodePageMemoryModificationScope(
- MemoryChunk* chunk)
+ BasicMemoryChunk* chunk)
: chunk_(chunk),
scope_active_(chunk_->heap()->write_protect_code_memory() &&
chunk_->IsFlagSet(MemoryChunk::IS_EXECUTABLE)) {
if (scope_active_) {
- DCHECK(chunk_->owner_identity() == CODE_SPACE ||
- (chunk_->owner_identity() == CODE_LO_SPACE));
- chunk_->SetReadAndWritable();
+ DCHECK(chunk_->owner()->identity() == CODE_SPACE ||
+ (chunk_->owner()->identity() == CODE_LO_SPACE));
+ MemoryChunk::cast(chunk_)->SetReadAndWritable();
}
}
CodePageMemoryModificationScope::~CodePageMemoryModificationScope() {
if (scope_active_) {
- chunk_->SetDefaultCodePermissions();
+ MemoryChunk::cast(chunk_)->SetDefaultCodePermissions();
}
}