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

Side by Side Diff: src/isolate.cc

Issue 2119313002: Provide handle scope when printing stack trace for debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 StackFrameIterator it(isolate); 816 StackFrameIterator it(isolate);
817 for (int i = 0; !it.done(); it.Advance()) { 817 for (int i = 0; !it.done(); it.Advance()) {
818 it.frame()->Print(accumulator, mode, i++); 818 it.frame()->Print(accumulator, mode, i++);
819 } 819 }
820 } 820 }
821 821
822 822
823 void Isolate::PrintStack(StringStream* accumulator, PrintStackMode mode) { 823 void Isolate::PrintStack(StringStream* accumulator, PrintStackMode mode) {
824 // The MentionedObjectCache is not GC-proof at the moment. 824 // The MentionedObjectCache is not GC-proof at the moment.
825 DisallowHeapAllocation no_gc; 825 DisallowHeapAllocation no_gc;
826 HandleScope scope(this);
826 DCHECK(accumulator->IsMentionedObjectCacheClear(this)); 827 DCHECK(accumulator->IsMentionedObjectCacheClear(this));
827 828
828 // Avoid printing anything if there are no frames. 829 // Avoid printing anything if there are no frames.
829 if (c_entry_fp(thread_local_top()) == 0) return; 830 if (c_entry_fp(thread_local_top()) == 0) return;
830 831
831 accumulator->Add( 832 accumulator->Add(
832 "\n==== JS stack trace =========================================\n\n"); 833 "\n==== JS stack trace =========================================\n\n");
833 PrintFrames(this, accumulator, StackFrame::OVERVIEW); 834 PrintFrames(this, accumulator, StackFrame::OVERVIEW);
834 if (mode == kPrintStackVerbose) { 835 if (mode == kPrintStackVerbose) {
835 accumulator->Add( 836 accumulator->Add(
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3086 // Then check whether this scope intercepts. 3087 // Then check whether this scope intercepts.
3087 if ((flag & intercept_mask_)) { 3088 if ((flag & intercept_mask_)) {
3088 intercepted_flags_ |= flag; 3089 intercepted_flags_ |= flag;
3089 return true; 3090 return true;
3090 } 3091 }
3091 return false; 3092 return false;
3092 } 3093 }
3093 3094
3094 } // namespace internal 3095 } // namespace internal
3095 } // namespace v8 3096 } // namespace v8
OLDNEW
« 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