Commit dee723df authored by danno@chromium.org's avatar danno@chromium.org

Reset the path tracer completely, and check whether an object has source code...

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 <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c0d2fe25
......@@ -6636,7 +6636,7 @@ void PathTracer::TracePathFrom(Object** root) {
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 @@ void PathTracer::ProcessResults() {
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");
}
......
......@@ -761,8 +761,10 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) {
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment