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

Unified Diff: src/mark-compact.cc

Issue 66011: Workaround for http://crbug.com/9746:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 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 | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 1687)
+++ src/mark-compact.cc (working copy)
@@ -96,6 +96,24 @@
}
+#ifdef DEBUG
+// Helper class for verifying the symbol table.
+class SymbolTableVerifier : public ObjectVisitor {
+ public:
+ SymbolTableVerifier() { }
+ void VisitPointers(Object** start, Object** end) {
+ // Visit all HeapObject pointers in [start, end).
+ for (Object** p = start; p < end; p++) {
+ if ((*p)->IsHeapObject()) {
+ // Check that the symbol is actually a symbol.
+ ASSERT((*p)->IsNull() || (*p)->IsUndefined() || (*p)->IsSymbol());
+ }
+ }
+ }
+};
+#endif // DEBUG
+
+
void MarkCompactCollector::Prepare(GCTracer* tracer) {
// Rather than passing the tracer around we stash it in a static member
// variable.
@@ -148,6 +166,10 @@
}
#ifdef DEBUG
+ SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table());
+ SymbolTableVerifier v;
+ symbol_table->IterateElements(&v);
+
live_bytes_ = 0;
live_young_objects_ = 0;
live_old_pointer_objects_ = 0;
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698