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

Unified Diff: src/spaces-inl.h

Issue 435003: Patch for allowing several V8 instances in process:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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 | « src/spaces.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 3427)
+++ src/spaces-inl.h (working copy)
@@ -177,13 +177,15 @@
bool MemoryAllocator::IsValidChunk(int chunk_id) {
if (!IsValidChunkId(chunk_id)) return false;
- ChunkInfo& c = chunks_[chunk_id];
+ MemoryAllocatorData::ChunkInfo& c =
+ v8_context()->memory_allocator_data_.chunks_[chunk_id];
return (c.address() != NULL) && (c.size() != 0) && (c.owner() != NULL);
}
bool MemoryAllocator::IsValidChunkId(int chunk_id) {
- return (0 <= chunk_id) && (chunk_id < max_nof_chunks_);
+ return (0 <= chunk_id) &&
+ (chunk_id < v8_context()->memory_allocator_data_.max_nof_chunks_);
}
@@ -193,7 +195,8 @@
int chunk_id = GetChunkId(p);
if (!IsValidChunkId(chunk_id)) return false;
- ChunkInfo& c = chunks_[chunk_id];
+ MemoryAllocatorData::ChunkInfo& c =
+ v8_context()->memory_allocator_data_.chunks_[chunk_id];
return (c.address() <= p->address()) &&
(p->address() < c.address() + c.size()) &&
(space == c.owner());
@@ -224,15 +227,16 @@
PagedSpace* MemoryAllocator::PageOwner(Page* page) {
int chunk_id = GetChunkId(page);
ASSERT(IsValidChunk(chunk_id));
- return chunks_[chunk_id].owner();
+ return v8_context()->memory_allocator_data_.chunks_[chunk_id].owner();
}
bool MemoryAllocator::InInitialChunk(Address address) {
- if (initial_chunk_ == NULL) return false;
+ MemoryAllocatorData& data = v8_context()->memory_allocator_data_;
+ if (data.initial_chunk_ == NULL) return false;
- Address start = static_cast<Address>(initial_chunk_->address());
- return (start <= address) && (address < start + initial_chunk_->size());
+ Address start = static_cast<Address>(data.initial_chunk_->address());
+ return (start <= address) && (address < start + data.initial_chunk_->size());
}
« no previous file with comments | « src/spaces.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698