| 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 "Uncaught RangeError: Maximum call stack size exceeded"; | 868 "Uncaught RangeError: Maximum call stack size exceeded"; |
| 869 | 869 |
| 870 | 870 |
| 871 Failure* Isolate::StackOverflow() { | 871 Failure* Isolate::StackOverflow() { |
| 872 HandleScope scope(this); | 872 HandleScope scope(this); |
| 873 // At this point we cannot create an Error object using its javascript | 873 // At this point we cannot create an Error object using its javascript |
| 874 // constructor. Instead, we copy the pre-constructed boilerplate and | 874 // constructor. Instead, we copy the pre-constructed boilerplate and |
| 875 // attach the stack trace as a hidden property. | 875 // attach the stack trace as a hidden property. |
| 876 Handle<String> key = factory()->stack_overflow_string(); | 876 Handle<String> key = factory()->stack_overflow_string(); |
| 877 Handle<JSObject> boilerplate = | 877 Handle<JSObject> boilerplate = |
| 878 Handle<JSObject>::cast(GetProperty(this, js_builtins_object(), key)); | 878 Handle<JSObject>::cast(Object::GetProperty(js_builtins_object(), key)); |
| 879 Handle<JSObject> exception = JSObject::Copy(boilerplate); | 879 Handle<JSObject> exception = JSObject::Copy(boilerplate); |
| 880 DoThrow(*exception, NULL); | 880 DoThrow(*exception, NULL); |
| 881 | 881 |
| 882 // Get stack trace limit. | 882 // Get stack trace limit. |
| 883 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); | 883 Handle<Object> error = GetProperty(js_builtins_object(), "$Error"); |
| 884 if (!error->IsJSObject()) return Failure::Exception(); | 884 if (!error->IsJSObject()) return Failure::Exception(); |
| 885 Handle<Object> stack_trace_limit = | 885 Handle<Object> stack_trace_limit = |
| 886 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); | 886 GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit"); |
| 887 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); | 887 if (!stack_trace_limit->IsNumber()) return Failure::Exception(); |
| 888 double dlimit = stack_trace_limit->Number(); | 888 double dlimit = stack_trace_limit->Number(); |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2311 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); | 2311 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); |
| 2312 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8); | 2312 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8); |
| 2313 JSObject::SetProperty(registry, name, obj, NONE, STRICT); | 2313 JSObject::SetProperty(registry, name, obj, NONE, STRICT); |
| 2314 } | 2314 } |
| 2315 } | 2315 } |
| 2316 return Handle<JSObject>::cast(factory()->symbol_registry()); | 2316 return Handle<JSObject>::cast(factory()->symbol_registry()); |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 | 2319 |
| 2320 } } // namespace v8::internal | 2320 } } // namespace v8::internal |
| OLD | NEW |