OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 StackFrameIterator it(isolate); | 698 StackFrameIterator it(isolate); |
699 for (int i = 0; !it.done(); it.Advance()) { | 699 for (int i = 0; !it.done(); it.Advance()) { |
700 it.frame()->Print(accumulator, mode, i++); | 700 it.frame()->Print(accumulator, mode, i++); |
701 } | 701 } |
702 } | 702 } |
703 | 703 |
704 | 704 |
705 void Isolate::PrintStack(StringStream* accumulator, PrintStackMode mode) { | 705 void Isolate::PrintStack(StringStream* accumulator, PrintStackMode mode) { |
706 // The MentionedObjectCache is not GC-proof at the moment. | 706 // The MentionedObjectCache is not GC-proof at the moment. |
707 DisallowHeapAllocation no_gc; | 707 DisallowHeapAllocation no_gc; |
708 DCHECK(StringStream::IsMentionedObjectCacheClear(this)); | 708 DCHECK(accumulator->IsMentionedObjectCacheClear(this)); |
709 | 709 |
710 // Avoid printing anything if there are no frames. | 710 // Avoid printing anything if there are no frames. |
711 if (c_entry_fp(thread_local_top()) == 0) return; | 711 if (c_entry_fp(thread_local_top()) == 0) return; |
712 | 712 |
713 accumulator->Add( | 713 accumulator->Add( |
714 "\n==== JS stack trace =========================================\n\n"); | 714 "\n==== JS stack trace =========================================\n\n"); |
715 PrintFrames(this, accumulator, StackFrame::OVERVIEW); | 715 PrintFrames(this, accumulator, StackFrame::OVERVIEW); |
716 if (mode == kPrintStackVerbose) { | 716 if (mode == kPrintStackVerbose) { |
717 accumulator->Add( | 717 accumulator->Add( |
718 "\n==== Details ================================================\n\n"); | 718 "\n==== Details ================================================\n\n"); |
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 // Then check whether this scope intercepts. | 2793 // Then check whether this scope intercepts. |
2794 if ((flag & intercept_mask_)) { | 2794 if ((flag & intercept_mask_)) { |
2795 intercepted_flags_ |= flag; | 2795 intercepted_flags_ |= flag; |
2796 return true; | 2796 return true; |
2797 } | 2797 } |
2798 return false; | 2798 return false; |
2799 } | 2799 } |
2800 | 2800 |
2801 } // namespace internal | 2801 } // namespace internal |
2802 } // namespace v8 | 2802 } // namespace v8 |
OLD | NEW |