| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (stack_trace_nesting_level_ == 0) { | 299 if (stack_trace_nesting_level_ == 0) { |
| 300 stack_trace_nesting_level_++; | 300 stack_trace_nesting_level_++; |
| 301 | 301 |
| 302 StringAllocator* allocator; | 302 StringAllocator* allocator; |
| 303 if (preallocated_message_space_ == NULL) { | 303 if (preallocated_message_space_ == NULL) { |
| 304 allocator = new HeapStringAllocator(); | 304 allocator = new HeapStringAllocator(); |
| 305 } else { | 305 } else { |
| 306 allocator = preallocated_message_space_; | 306 allocator = preallocated_message_space_; |
| 307 } | 307 } |
| 308 | 308 |
| 309 NativeAllocationChecker allocation_checker( | |
| 310 !FLAG_preallocate_message_memory ? | |
| 311 NativeAllocationChecker::ALLOW : | |
| 312 NativeAllocationChecker::DISALLOW); | |
| 313 | |
| 314 StringStream::ClearMentionedObjectCache(); | 309 StringStream::ClearMentionedObjectCache(); |
| 315 StringStream accumulator(allocator); | 310 StringStream accumulator(allocator); |
| 316 incomplete_message_ = &accumulator; | 311 incomplete_message_ = &accumulator; |
| 317 PrintStack(&accumulator); | 312 PrintStack(&accumulator); |
| 318 accumulator.OutputToStdOut(); | 313 accumulator.OutputToStdOut(); |
| 319 accumulator.Log(); | 314 accumulator.Log(); |
| 320 incomplete_message_ = NULL; | 315 incomplete_message_ = NULL; |
| 321 stack_trace_nesting_level_ = 0; | 316 stack_trace_nesting_level_ = 0; |
| 322 if (preallocated_message_space_ == NULL) { | 317 if (preallocated_message_space_ == NULL) { |
| 323 // Remove the HeapStringAllocator created above. | 318 // Remove the HeapStringAllocator created above. |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 thread_local_top()->simulator_ = Simulator::current(this); | 971 thread_local_top()->simulator_ = Simulator::current(this); |
| 977 #endif | 972 #endif |
| 978 #endif | 973 #endif |
| 979 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { | 974 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { |
| 980 RuntimeProfiler::IsolateEnteredJS(this); | 975 RuntimeProfiler::IsolateEnteredJS(this); |
| 981 } | 976 } |
| 982 return from + sizeof(ThreadLocalTop); | 977 return from + sizeof(ThreadLocalTop); |
| 983 } | 978 } |
| 984 | 979 |
| 985 } } // namespace v8::internal | 980 } } // namespace v8::internal |
| OLD | NEW |