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

Unified Diff: src/log.cc

Issue 8079002: Make sure that heap is iterable prior to iterating it in Logger:: methods. (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 6373a35161cd2963210bcc024585db0eb6dbc252..bad5fdc93098d9d32acaaa76d43400dbf141f823 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1519,6 +1519,7 @@ void Logger::LowLevelLogWriteBytes(const char* bytes, int size) {
void Logger::LogCodeObjects() {
+ HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
HeapIterator iterator;
AssertNoAllocation no_alloc;
for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
@@ -1573,6 +1574,7 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
void Logger::LogCompiledFunctions() {
+ HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
HandleScope scope;
const int compiled_funcs_count = EnumerateCompiledFunctions(NULL, NULL);
Vyacheslav Egorov (Chromium) 2011/09/29 15:01:28 add AssertNoAllocation no_alloc; for the sake o
mnaganov (inactive) 2011/09/29 15:06:41 It's already stated in EnumerateCompiledFunctions.
ScopedVector< Handle<SharedFunctionInfo> > sfis(compiled_funcs_count);
@@ -1591,6 +1593,7 @@ void Logger::LogCompiledFunctions() {
void Logger::LogAccessorCallbacks() {
+ HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
HeapIterator iterator;
AssertNoAllocation no_alloc;
for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
« 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