| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 | 505 |
| 506 const char* Isolate::kStackOverflowMessage = | 506 const char* Isolate::kStackOverflowMessage = |
| 507 "Uncaught RangeError: Maximum call stack size exceeded"; | 507 "Uncaught RangeError: Maximum call stack size exceeded"; |
| 508 | 508 |
| 509 | 509 |
| 510 Failure* Isolate::StackOverflow() { | 510 Failure* Isolate::StackOverflow() { |
| 511 HandleScope scope; | 511 HandleScope scope; |
| 512 Handle<String> key = Factory::stack_overflow_symbol(); | 512 Handle<String> key = Factory::stack_overflow_symbol(); |
| 513 Handle<JSObject> boilerplate = | 513 Handle<JSObject> boilerplate = |
| 514 Handle<JSObject>::cast(GetProperty(builtins(), key)); | 514 Handle<JSObject>::cast(GetProperty(js_builtins_object(), key)); |
| 515 Handle<Object> exception = Copy(boilerplate); | 515 Handle<Object> exception = Copy(boilerplate); |
| 516 // TODO(1240995): To avoid having to call JavaScript code to compute | 516 // TODO(1240995): To avoid having to call JavaScript code to compute |
| 517 // the message for stack overflow exceptions which is very likely to | 517 // the message for stack overflow exceptions which is very likely to |
| 518 // double fault with another stack overflow exception, we use a | 518 // double fault with another stack overflow exception, we use a |
| 519 // precomputed message. This is somewhat problematic in that it | 519 // precomputed message. This is somewhat problematic in that it |
| 520 // doesn't use ReportUncaughtException to determine the location | 520 // doesn't use ReportUncaughtException to determine the location |
| 521 // from where the exception occurred. It should probably be | 521 // from where the exception occurred. It should probably be |
| 522 // reworked. | 522 // reworked. |
| 523 DoThrow(*exception, NULL, kStackOverflowMessage); | 523 DoThrow(*exception, NULL, kStackOverflowMessage); |
| 524 return Failure::Exception(); | 524 return Failure::Exception(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 Isolate::Current()->break_access()->Lock(); | 899 Isolate::Current()->break_access()->Lock(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 | 902 |
| 903 ExecutionAccess::~ExecutionAccess() { | 903 ExecutionAccess::~ExecutionAccess() { |
| 904 Isolate::Current()->break_access()->Unlock(); | 904 Isolate::Current()->break_access()->Unlock(); |
| 905 } | 905 } |
| 906 | 906 |
| 907 | 907 |
| 908 } } // namespace v8::internal | 908 } } // namespace v8::internal |
| OLD | NEW |