Revision: 11822
Author: [email protected]
Date: Thu Jun 14 08:33:15 2012
Log: Reset the path tracer completely, and check whether an object has
source code before trying to print
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9749008
Patch from Jochen Eisigner <[email protected]>.
http://code.google.com/p/v8/source/detail?r=11822
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/objects-printer.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Jun 14 07:06:22 2012
+++ /branches/bleeding_edge/src/heap.cc Thu Jun 14 08:33:15 2012
@@ -6636,7 +6636,7 @@
ASSERT((search_target_ == kAnyGlobalObject) ||
search_target_->IsHeapObject());
found_target_in_trace_ = false;
- object_stack_.Clear();
+ Reset();
MarkVisitor mark_visitor(this);
MarkRecursively(root, &mark_visitor);
@@ -6740,11 +6740,7 @@
for (int i = 0; i < object_stack_.length(); i++) {
if (i > 0) PrintF("\n |\n |\n V\n\n");
Object* obj = object_stack_[i];
-#ifdef OBJECT_PRINT
obj->Print();
-#else
- obj->ShortPrint();
-#endif
}
PrintF("=====================================\n");
}
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Sun Jun 10 23:59:56 2012
+++ /branches/bleeding_edge/src/objects-printer.cc Thu Jun 14 08:33:15 2012
@@ -761,8 +761,10 @@
instance_class_name()->Print(out);
PrintF(out, "\n - code = ");
code()->ShortPrint(out);
- PrintF(out, "\n - source code = ");
- GetSourceCode()->ShortPrint(out);
+ if (HasSourceCode()) {
+ PrintF(out, "\n - source code = ");
+ GetSourceCode()->ShortPrint(out);
+ }
// Script files are often large, hard to read.
// PrintF(out, "\n - script =");
// script()->Print(out);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev