| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 strict_reserved_word: ["Use of future reserved word in strict mode
"], | 244 strict_reserved_word: ["Use of future reserved word in strict mode
"], |
| 245 strict_delete: ["Delete of an unqualified identifier in str
ict mode."], | 245 strict_delete: ["Delete of an unqualified identifier in str
ict mode."], |
| 246 strict_delete_property: ["Cannot delete property '", "%0", "' of ",
"%1"], | 246 strict_delete_property: ["Cannot delete property '", "%0", "' of ",
"%1"], |
| 247 strict_const: ["Use of const in strict mode."], | 247 strict_const: ["Use of const in strict mode."], |
| 248 strict_function: ["In strict mode code, functions can only be
declared at top level or immediately within another function." ], | 248 strict_function: ["In strict mode code, functions can only be
declared at top level or immediately within another function." ], |
| 249 strict_read_only_property: ["Cannot assign to read only property '", "%
0", "' of ", "%1"], | 249 strict_read_only_property: ["Cannot assign to read only property '", "%
0", "' of ", "%1"], |
| 250 strict_cannot_assign: ["Cannot assign to read only '", "%0", "' in
strict mode"], | 250 strict_cannot_assign: ["Cannot assign to read only '", "%0", "' in
strict mode"], |
| 251 strict_poison_pill: ["'caller', 'callee', and 'arguments' proper
ties may not be accessed on strict mode functions or the arguments objects for c
alls to them"], | 251 strict_poison_pill: ["'caller', 'callee', and 'arguments' proper
ties may not be accessed on strict mode functions or the arguments objects for c
alls to them"], |
| 252 strict_caller: ["Illegal access to a strict mode caller fun
ction."], | 252 strict_caller: ["Illegal access to a strict mode caller fun
ction."], |
| 253 unprotected_let: ["Illegal let declaration in unprotected sta
tement context."], | 253 unprotected_let: ["Illegal let declaration in unprotected sta
tement context."], |
| 254 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an
object with external array elements"], |
| 255 redef_external_array_element: ["Cannot redefine a property of an object wi
th external array elements"], |
| 254 }; | 256 }; |
| 255 } | 257 } |
| 256 var message_type = %MessageGetType(message); | 258 var message_type = %MessageGetType(message); |
| 257 var format = kMessages[message_type]; | 259 var format = kMessages[message_type]; |
| 258 if (!format) return "<unknown message " + message_type + ">"; | 260 if (!format) return "<unknown message " + message_type + ">"; |
| 259 return FormatString(format, message); | 261 return FormatString(format, message); |
| 260 } | 262 } |
| 261 | 263 |
| 262 | 264 |
| 263 function GetLineNumber(message) { | 265 function GetLineNumber(message) { |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 throw e; | 1143 throw e; |
| 1142 } | 1144 } |
| 1143 } | 1145 } |
| 1144 | 1146 |
| 1145 | 1147 |
| 1146 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); | 1148 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); |
| 1147 | 1149 |
| 1148 // Boilerplate for exceptions for stack overflows. Used from | 1150 // Boilerplate for exceptions for stack overflows. Used from |
| 1149 // Isolate::StackOverflow(). | 1151 // Isolate::StackOverflow(). |
| 1150 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1152 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |