Commit 3eb3f8cb authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fix crash in partial snapshot test when running with no boot snapshot.

Review URL: http://codereview.chromium.org/8381003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent db954360
......@@ -757,7 +757,7 @@ static const int kUnknownOffsetFromStart = -1;
void Deserializer::ReadChunk(Object** current,
Object** limit,
int source_space,
Address address) {
Address current_object_address) {
Isolate* const isolate = isolate_;
while (current < limit) {
int data = source_->Get();
......@@ -845,9 +845,11 @@ void Deserializer::ReadChunk(Object** current,
*current = new_object; \
} \
} \
if (emit_write_barrier) { \
isolate->heap()->RecordWrite(address, static_cast<int>( \
reinterpret_cast<Address>(current) - address)); \
if (emit_write_barrier && current_object_address != NULL) { \
Address current_address = reinterpret_cast<Address>(current); \
isolate->heap()->RecordWrite( \
current_object_address, \
static_cast<int>(current_address - current_object_address)); \
} \
if (!current_was_incremented) { \
current++; /* Increment current if it wasn't done above. */ \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment