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

Unified Diff: src/api.cc

Issue 462019: Added recording of heap and global handle stats in a stack-allocated (Closed)
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 | « no previous file | src/global-handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 3a2f8ab745ba225fbd4411a08070c76060ad006c..eaff86255f2d15403bd7b738d4a2fbc95e379fa3 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -125,7 +125,8 @@ 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) {
+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) {
}
+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;
}
« no previous file with comments | « no previous file | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698