| 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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 | 1082 |
| 1083 | 1083 |
| 1084 Failure* Isolate::StackOverflow() { | 1084 Failure* Isolate::StackOverflow() { |
| 1085 HandleScope scope(this); | 1085 HandleScope scope(this); |
| 1086 // At this point we cannot create an Error object using its javascript | 1086 // At this point we cannot create an Error object using its javascript |
| 1087 // constructor. Instead, we copy the pre-constructed boilerplate and | 1087 // constructor. Instead, we copy the pre-constructed boilerplate and |
| 1088 // attach the stack trace as a hidden property. | 1088 // attach the stack trace as a hidden property. |
| 1089 Handle<String> key = factory()->stack_overflow_string(); | 1089 Handle<String> key = factory()->stack_overflow_string(); |
| 1090 Handle<JSObject> boilerplate = | 1090 Handle<JSObject> boilerplate = |
| 1091 Handle<JSObject>::cast(GetProperty(this, js_builtins_object(), key)); | 1091 Handle<JSObject>::cast(GetProperty(this, js_builtins_object(), key)); |
| 1092 Handle<JSObject> exception = Copy(boilerplate); | 1092 Handle<JSObject> exception = JSObject::Copy(boilerplate); |
| 1093 DoThrow(*exception, NULL); | 1093 DoThrow(*exception, NULL); |
| 1094 | 1094 |
| 1095 // Get stack trace limit. | 1095 // Get stack trace limit. |
| 1096 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); | 1096 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); |
| 1097 if (!error->IsJSObject()) return Failure::Exception(); | 1097 if (!error->IsJSObject()) return Failure::Exception(); |
| 1098 Handle<Object> stack_trace_limit = | 1098 Handle<Object> stack_trace_limit = |
| 1099 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); | 1099 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); |
| 1100 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); | 1100 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); |
| 1101 double dlimit = stack_trace_limit->Number(); | 1101 double dlimit = stack_trace_limit->Number(); |
| 1102 int limit = std::isnan(dlimit) ? 0 : static_cast<int>(dlimit); | 1102 int limit = std::isnan(dlimit) ? 0 : static_cast<int>(dlimit); |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 | 2526 |
| 2527 #ifdef DEBUG | 2527 #ifdef DEBUG |
| 2528 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2528 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2529 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2529 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2530 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2530 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2531 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2531 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2532 #undef ISOLATE_FIELD_OFFSET | 2532 #undef ISOLATE_FIELD_OFFSET |
| 2533 #endif | 2533 #endif |
| 2534 | 2534 |
| 2535 } } // namespace v8::internal | 2535 } } // namespace v8::internal |
| OLD | NEW |