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

Side by Side Diff: src/api.cc

Issue 7995003: Don't take heap snapshot when doing Heap::RecordStats from OOM cases. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 heap_stats.memory_allocator_capacity = &memory_allocator_capacity; 178 heap_stats.memory_allocator_capacity = &memory_allocator_capacity;
179 int objects_per_type[LAST_TYPE + 1] = {0}; 179 int objects_per_type[LAST_TYPE + 1] = {0};
180 heap_stats.objects_per_type = objects_per_type; 180 heap_stats.objects_per_type = objects_per_type;
181 int size_per_type[LAST_TYPE + 1] = {0}; 181 int size_per_type[LAST_TYPE + 1] = {0};
182 heap_stats.size_per_type = size_per_type; 182 heap_stats.size_per_type = size_per_type;
183 int os_error; 183 int os_error;
184 heap_stats.os_error = &os_error; 184 heap_stats.os_error = &os_error;
185 int end_marker; 185 int end_marker;
186 heap_stats.end_marker = &end_marker; 186 heap_stats.end_marker = &end_marker;
187 i::Isolate* isolate = i::Isolate::Current(); 187 i::Isolate* isolate = i::Isolate::Current();
188 isolate->heap()->RecordStats(&heap_stats, take_snapshot); 188 // BUG(1718):
189 // Don't use the take_snapshot since we don't support HeapIterator in new
190 // gc.
Vyacheslav Egorov (Chromium) 2011/09/22 14:40:38 comment is not precise: we support it, but you nee
191 isolate->heap()->RecordStats(&heap_stats, false);
189 i::V8::SetFatalError(); 192 i::V8::SetFatalError();
190 FatalErrorCallback callback = GetFatalErrorHandler(); 193 FatalErrorCallback callback = GetFatalErrorHandler();
191 { 194 {
192 LEAVE_V8(isolate); 195 LEAVE_V8(isolate);
193 callback(location, "Allocation failed - process out of memory"); 196 callback(location, "Allocation failed - process out of memory");
194 } 197 }
195 // If the callback returns, we stop execution. 198 // If the callback returns, we stop execution.
196 UNREACHABLE(); 199 UNREACHABLE();
197 } 200 }
198 201
(...skipping 5878 matching lines...) Expand 10 before | Expand all | Expand 10 after
6077 6080
6078 6081
6079 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6082 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6080 HandleScopeImplementer* scope_implementer = 6083 HandleScopeImplementer* scope_implementer =
6081 reinterpret_cast<HandleScopeImplementer*>(storage); 6084 reinterpret_cast<HandleScopeImplementer*>(storage);
6082 scope_implementer->IterateThis(v); 6085 scope_implementer->IterateThis(v);
6083 return storage + ArchiveSpacePerThread(); 6086 return storage + ArchiveSpacePerThread();
6084 } 6087 }
6085 6088
6086 } } // namespace v8::internal 6089 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698