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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 Handle<JSObject> exception = Copy(boilerplate); | 1053 Handle<JSObject> exception = Copy(boilerplate); |
1054 DoThrow(*exception, NULL); | 1054 DoThrow(*exception, NULL); |
1055 | 1055 |
1056 // Get stack trace limit. | 1056 // Get stack trace limit. |
1057 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); | 1057 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); |
1058 if (!error->IsJSObject()) return Failure::Exception(); | 1058 if (!error->IsJSObject()) return Failure::Exception(); |
1059 Handle<Object> stack_trace_limit = | 1059 Handle<Object> stack_trace_limit = |
1060 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); | 1060 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); |
1061 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); | 1061 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); |
1062 double dlimit = stack_trace_limit->Number(); | 1062 double dlimit = stack_trace_limit->Number(); |
1063 int limit = isnan(dlimit) ? 0 : static_cast<int>(dlimit); | 1063 int limit = std::isnan(dlimit) ? 0 : static_cast<int>(dlimit); |
1064 | 1064 |
1065 Handle<JSArray> stack_trace = CaptureSimpleStackTrace( | 1065 Handle<JSArray> stack_trace = CaptureSimpleStackTrace( |
1066 exception, factory()->undefined_value(), limit); | 1066 exception, factory()->undefined_value(), limit); |
1067 JSObject::SetHiddenProperty(exception, | 1067 JSObject::SetHiddenProperty(exception, |
1068 factory()->hidden_stack_trace_string(), | 1068 factory()->hidden_stack_trace_string(), |
1069 stack_trace); | 1069 stack_trace); |
1070 return Failure::Exception(); | 1070 return Failure::Exception(); |
1071 } | 1071 } |
1072 | 1072 |
1073 | 1073 |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 | 2406 |
2407 #ifdef DEBUG | 2407 #ifdef DEBUG |
2408 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2408 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2409 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2409 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2410 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2410 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2411 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2411 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2412 #undef ISOLATE_FIELD_OFFSET | 2412 #undef ISOLATE_FIELD_OFFSET |
2413 #endif | 2413 #endif |
2414 | 2414 |
2415 } } // namespace v8::internal | 2415 } } // namespace v8::internal |
OLD | NEW |