| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 frames_seen++; | 837 frames_seen++; |
| 838 } | 838 } |
| 839 it.Advance(); | 839 it.Advance(); |
| 840 } | 840 } |
| 841 | 841 |
| 842 stack_trace->set_length(Smi::FromInt(frames_seen)); | 842 stack_trace->set_length(Smi::FromInt(frames_seen)); |
| 843 return stack_trace; | 843 return stack_trace; |
| 844 } | 844 } |
| 845 | 845 |
| 846 | 846 |
| 847 void Isolate::PrintStack() { |
| 848 PrintStack(stdout); |
| 849 } |
| 850 |
| 851 |
| 847 void Isolate::PrintStack(FILE* out) { | 852 void Isolate::PrintStack(FILE* out) { |
| 848 if (stack_trace_nesting_level_ == 0) { | 853 if (stack_trace_nesting_level_ == 0) { |
| 849 stack_trace_nesting_level_++; | 854 stack_trace_nesting_level_++; |
| 850 | 855 |
| 851 StringAllocator* allocator; | 856 StringAllocator* allocator; |
| 852 if (preallocated_message_space_ == NULL) { | 857 if (preallocated_message_space_ == NULL) { |
| 853 allocator = new HeapStringAllocator(); | 858 allocator = new HeapStringAllocator(); |
| 854 } else { | 859 } else { |
| 855 allocator = preallocated_message_space_; | 860 allocator = preallocated_message_space_; |
| 856 } | 861 } |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2516 | 2521 |
| 2517 #ifdef DEBUG | 2522 #ifdef DEBUG |
| 2518 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2523 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2519 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2524 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2520 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2525 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2521 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2526 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2522 #undef ISOLATE_FIELD_OFFSET | 2527 #undef ISOLATE_FIELD_OFFSET |
| 2523 #endif | 2528 #endif |
| 2524 | 2529 |
| 2525 } } // namespace v8::internal | 2530 } } // namespace v8::internal |
| OLD | NEW |