| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 48c64b314088fc40e8f048c78c1e0b9a77e649a8..4fdc95f5ee8a7b27bf01da11f72a6e3a1cd23136 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -126,7 +126,7 @@ static FatalErrorCallback& GetFatalErrorHandler() {
|
|
|
| // When V8 cannot allocated memory FatalProcessOutOfMemory is called.
|
| // The default fatal error handler is called and execution is stopped.
|
| -void i::V8::FatalProcessOutOfMemory(const char* location) {
|
| +void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) {
|
| i::HeapStats heap_stats;
|
| int start_marker;
|
| heap_stats.start_marker = &start_marker;
|
| @@ -166,9 +166,17 @@ void i::V8::FatalProcessOutOfMemory(const char* location) {
|
| heap_stats.near_death_global_handle_count = &near_death_global_handle_count;
|
| int destroyed_global_handle_count;
|
| heap_stats.destroyed_global_handle_count = &destroyed_global_handle_count;
|
| + int memory_allocator_size;
|
| + heap_stats.memory_allocator_size = &memory_allocator_size;
|
| + int memory_allocator_capacity;
|
| + heap_stats.memory_allocator_capacity = &memory_allocator_capacity;
|
| + int objects_per_type[LAST_TYPE + 1] = {0};
|
| + heap_stats.objects_per_type = objects_per_type;
|
| + int size_per_type[LAST_TYPE + 1] = {0};
|
| + heap_stats.size_per_type = size_per_type;
|
| int end_marker;
|
| heap_stats.end_marker = &end_marker;
|
| - i::Heap::RecordStats(&heap_stats);
|
| + i::Heap::RecordStats(&heap_stats, take_snapshot);
|
| i::V8::SetFatalError();
|
| FatalErrorCallback callback = GetFatalErrorHandler();
|
| {
|
|
|