| 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1043   var raw_stack = %CollectStackTrace(cons_opt | 1043   var raw_stack = %CollectStackTrace(cons_opt | 
| 1044                                      ? cons_opt | 1044                                      ? cons_opt | 
| 1045                                      : captureStackTrace, stackTraceLimit); | 1045                                      : captureStackTrace, stackTraceLimit); | 
| 1046   DefineOneShotAccessor(obj, 'stack', function (obj) { | 1046   DefineOneShotAccessor(obj, 'stack', function (obj) { | 
| 1047     return FormatRawStackTrace(obj, raw_stack); | 1047     return FormatRawStackTrace(obj, raw_stack); | 
| 1048   }); | 1048   }); | 
| 1049 }; | 1049 }; | 
| 1050 | 1050 | 
| 1051 $Math.__proto__ = global.Object.prototype; | 1051 $Math.__proto__ = global.Object.prototype; | 
| 1052 | 1052 | 
| 1053 DefineError(function Error() { }); | 1053 // DefineError is a native function. Use explicit receiver. Otherwise | 
| 1054 DefineError(function TypeError() { }); | 1054 // the receiver will be 'undefined'. | 
| 1055 DefineError(function RangeError() { }); | 1055 this.DefineError(function Error() { }); | 
| 1056 DefineError(function SyntaxError() { }); | 1056 this.DefineError(function TypeError() { }); | 
| 1057 DefineError(function ReferenceError() { }); | 1057 this.DefineError(function RangeError() { }); | 
| 1058 DefineError(function EvalError() { }); | 1058 this.DefineError(function SyntaxError() { }); | 
| 1059 DefineError(function URIError() { }); | 1059 this.DefineError(function ReferenceError() { }); | 
|  | 1060 this.DefineError(function EvalError() { }); | 
|  | 1061 this.DefineError(function URIError() { }); | 
| 1060 | 1062 | 
| 1061 $Error.captureStackTrace = captureStackTrace; | 1063 $Error.captureStackTrace = captureStackTrace; | 
| 1062 | 1064 | 
| 1063 // Setup extra properties of the Error.prototype object. | 1065 // Setup extra properties of the Error.prototype object. | 
| 1064 function setErrorMessage() { | 1066 function setErrorMessage() { | 
| 1065   var desc = {value: '', | 1067   var desc = {value: '', | 
| 1066               enumerable: false, | 1068               enumerable: false, | 
| 1067               configurable: true, | 1069               configurable: true, | 
| 1068               writable: true }; | 1070               writable: true }; | 
| 1069   DefineOwnProperty($Error.prototype, | 1071   DefineOwnProperty($Error.prototype, | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1115     else throw e; | 1117     else throw e; | 
| 1116   } | 1118   } | 
| 1117 } | 1119 } | 
| 1118 | 1120 | 
| 1119 | 1121 | 
| 1120 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); | 1122 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); | 
| 1121 | 1123 | 
| 1122 // Boilerplate for exceptions for stack overflows. Used from | 1124 // Boilerplate for exceptions for stack overflows. Used from | 
| 1123 // Isolate::StackOverflow(). | 1125 // Isolate::StackOverflow(). | 
| 1124 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1126 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 
| OLD | NEW | 
|---|