Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Unified Diff: src/api.cc

Issue 1862653002: Move MemoryAllocator and CodeRange into Heap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/extensions/statistics-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 2ded3f73cf7d7c9e5fe9f87060203b75a78991bb..3e52cc0e6fd61cf0607644ae4cde52316685010e 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7189,7 +7189,7 @@ void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback,
ObjectSpace space,
AllocationAction action) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- isolate->memory_allocator()->AddMemoryAllocationCallback(
+ isolate->heap()->memory_allocator()->AddMemoryAllocationCallback(
callback, space, action);
}
@@ -7197,8 +7197,7 @@ void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback,
void Isolate::RemoveMemoryAllocationCallback(
MemoryAllocationCallback callback) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- isolate->memory_allocator()->RemoveMemoryAllocationCallback(
- callback);
+ isolate->heap()->memory_allocator()->RemoveMemoryAllocationCallback(callback);
}
@@ -7693,9 +7692,10 @@ void Isolate::SetStackLimit(uintptr_t stack_limit) {
void Isolate::GetCodeRange(void** start, size_t* length_in_bytes) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- if (isolate->code_range()->valid()) {
- *start = isolate->code_range()->start();
- *length_in_bytes = isolate->code_range()->size();
+ if (isolate->heap()->memory_allocator()->code_range()->valid()) {
+ *start = isolate->heap()->memory_allocator()->code_range()->start();
+ *length_in_bytes =
+ isolate->heap()->memory_allocator()->code_range()->size();
} else {
*start = NULL;
*length_in_bytes = 0;
« no previous file with comments | « no previous file | src/extensions/statistics-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698