Index: src/api.cc |
=================================================================== |
--- src/api.cc (revision 3407) |
+++ src/api.cc (working copy) |
@@ -125,7 +125,8 @@ |
// 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) { |
+static void ExecuteFatalProcessOutOfMemory(const char* location, |
+ i::HeapStats* heap_stats) { |
i::V8::SetFatalError(); |
FatalErrorCallback callback = GetFatalErrorHandler(); |
{ |
@@ -137,6 +138,13 @@ |
} |
+void i::V8::FatalProcessOutOfMemory(const char* location) { |
+ i::HeapStats heap_stats; |
+ i::Heap::RecordStats(&heap_stats); |
+ ExecuteFatalProcessOutOfMemory(location, &heap_stats); |
+} |
+ |
+ |
void V8::SetFatalErrorHandler(FatalErrorCallback that) { |
exception_behavior = that; |
} |