| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 Handle<Smi> offset(Smi::FromInt(frames[i].offset())); | 632 Handle<Smi> offset(Smi::FromInt(frames[i].offset())); |
| 633 elements->set(cursor++, *recv); | 633 elements->set(cursor++, *recv); |
| 634 elements->set(cursor++, *fun); | 634 elements->set(cursor++, *fun); |
| 635 elements->set(cursor++, *code); | 635 elements->set(cursor++, *code); |
| 636 elements->set(cursor++, *offset); | 636 elements->set(cursor++, *offset); |
| 637 } | 637 } |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 Handle<JSArray> result = factory()->NewJSArrayWithElements(elements); | 640 Handle<JSArray> result = factory()->NewJSArrayWithElements(elements); |
| 641 result->set_length(Smi::FromInt(cursor)); | 641 result->set_length(Smi::FromInt(cursor)); |
| 642 heap()->error_object_list()->Add(*error_object); |
| 642 return result; | 643 return result; |
| 643 } | 644 } |
| 644 | 645 |
| 645 | 646 |
| 646 void Isolate::CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object) { | 647 void Isolate::CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object) { |
| 647 if (capture_stack_trace_for_uncaught_exceptions_) { | 648 if (capture_stack_trace_for_uncaught_exceptions_) { |
| 648 // Capture stack trace for a detailed exception message. | 649 // Capture stack trace for a detailed exception message. |
| 649 Handle<String> key = factory()->hidden_stack_trace_symbol(); | 650 Handle<String> key = factory()->hidden_stack_trace_symbol(); |
| 650 Handle<JSArray> stack_trace = CaptureCurrentStackTrace( | 651 Handle<JSArray> stack_trace = CaptureCurrentStackTrace( |
| 651 stack_trace_for_uncaught_exceptions_frame_limit_, | 652 stack_trace_for_uncaught_exceptions_frame_limit_, |
| (...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 | 2161 |
| 2161 #ifdef DEBUG | 2162 #ifdef DEBUG |
| 2162 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2163 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2163 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2164 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2164 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2165 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2165 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2166 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2166 #undef ISOLATE_FIELD_OFFSET | 2167 #undef ISOLATE_FIELD_OFFSET |
| 2167 #endif | 2168 #endif |
| 2168 | 2169 |
| 2169 } } // namespace v8::internal | 2170 } } // namespace v8::internal |
| OLD | NEW |