OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1108 matching lines...) Loading... |
1119 %IgnoreAttributesAndSetProperty(this, | 1119 %IgnoreAttributesAndSetProperty(this, |
1120 'message', | 1120 'message', |
1121 ToString(m), | 1121 ToString(m), |
1122 DONT_ENUM); | 1122 DONT_ENUM); |
1123 } | 1123 } |
1124 captureStackTrace(this, f); | 1124 captureStackTrace(this, f); |
1125 } else { | 1125 } else { |
1126 return new f(m); | 1126 return new f(m); |
1127 } | 1127 } |
1128 }); | 1128 }); |
| 1129 %SetNativeFlag(f); |
1129 } | 1130 } |
1130 | 1131 |
1131 DefineError(function Error() { }); | 1132 DefineError(function Error() { }); |
1132 DefineError(function TypeError() { }); | 1133 DefineError(function TypeError() { }); |
1133 DefineError(function RangeError() { }); | 1134 DefineError(function RangeError() { }); |
1134 DefineError(function SyntaxError() { }); | 1135 DefineError(function SyntaxError() { }); |
1135 DefineError(function ReferenceError() { }); | 1136 DefineError(function ReferenceError() { }); |
1136 DefineError(function EvalError() { }); | 1137 DefineError(function EvalError() { }); |
1137 DefineError(function URIError() { }); | 1138 DefineError(function URIError() { }); |
1138 } | 1139 } |
(...skipping 45 matching lines...) Loading... |
1184 throw e; | 1185 throw e; |
1185 } | 1186 } |
1186 } | 1187 } |
1187 | 1188 |
1188 | 1189 |
1189 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); | 1190 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); |
1190 | 1191 |
1191 // Boilerplate for exceptions for stack overflows. Used from | 1192 // Boilerplate for exceptions for stack overflows. Used from |
1192 // Isolate::StackOverflow(). | 1193 // Isolate::StackOverflow(). |
1193 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1194 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |