Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 52b6192b87643bec0a0abff62dac9864da01baf7..3ef2e025dbc776cd06af1895058a446807bd27ff 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -7343,9 +7343,9 @@ class Internals { |
| static const int kAmountOfExternalAllocatedMemoryOffset = |
| 4 * kApiPointerSize; |
| static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = |
| - kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; |
| + kAmountOfExternalAllocatedMemoryOffset + kApiPointerSize; |
| static const int kIsolateRootsOffset = |
| - kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + |
| + kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiPointerSize + |
| kApiPointerSize; |
| static const int kUndefinedValueRootIndex = 4; |
| static const int kTheHoleValueRootIndex = 5; |
| @@ -8552,14 +8552,15 @@ uint32_t Isolate::GetNumberOfDataSlots() { |
| int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( |
| int64_t change_in_bytes) { |
| typedef internal::Internals I; |
| - int64_t* amount_of_external_allocated_memory = |
| - reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(this) + |
| - I::kAmountOfExternalAllocatedMemoryOffset); |
| - int64_t* amount_of_external_allocated_memory_at_last_global_gc = |
| - reinterpret_cast<int64_t*>( |
| + intptr_t* amount_of_external_allocated_memory = |
| + reinterpret_cast<intptr_t*>(reinterpret_cast<uint8_t*>(this) + |
| + I::kAmountOfExternalAllocatedMemoryOffset); |
| + intptr_t* amount_of_external_allocated_memory_at_last_global_gc = |
| + reinterpret_cast<intptr_t*>( |
|
Michael Lippautz
2016/05/11 08:22:51
It's really unfortunate that we require this magic
|
| reinterpret_cast<uint8_t*>(this) + |
| I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset); |
| - int64_t amount = *amount_of_external_allocated_memory + change_in_bytes; |
| + intptr_t amount = *amount_of_external_allocated_memory + |
| + static_cast<intptr_t>(change_in_bytes); |
| if (change_in_bytes > 0 && |
| amount - *amount_of_external_allocated_memory_at_last_global_gc > |
| I::kExternalAllocationLimit) { |