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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 strict_lhs_prefix: ["Prefix increment/decrement may not have ev
al or arguments operand in strict mode"], | 234 strict_lhs_prefix: ["Prefix increment/decrement may not have ev
al or arguments operand in strict mode"], |
235 strict_reserved_word: ["Use of future reserved word in strict mode
"], | 235 strict_reserved_word: ["Use of future reserved word in strict mode
"], |
236 strict_delete: ["Delete of an unqualified identifier in str
ict mode."], | 236 strict_delete: ["Delete of an unqualified identifier in str
ict mode."], |
237 strict_delete_property: ["Cannot delete property '", "%0", "' of ",
"%1"], | 237 strict_delete_property: ["Cannot delete property '", "%0", "' of ",
"%1"], |
238 strict_const: ["Use of const in strict mode."], | 238 strict_const: ["Use of const in strict mode."], |
239 strict_function: ["In strict mode code, functions can only be
declared at top level or immediately within another function." ], | 239 strict_function: ["In strict mode code, functions can only be
declared at top level or immediately within another function." ], |
240 strict_read_only_property: ["Cannot assign to read only property '", "%
0", "' of ", "%1"], | 240 strict_read_only_property: ["Cannot assign to read only property '", "%
0", "' of ", "%1"], |
241 strict_cannot_assign: ["Cannot assign to read only '", "%0", "' in
strict mode"], | 241 strict_cannot_assign: ["Cannot assign to read only '", "%0", "' in
strict mode"], |
242 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"], | 242 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"], |
243 strict_caller: ["Illegal access to a strict mode caller fun
ction."], | 243 strict_caller: ["Illegal access to a strict mode caller fun
ction."], |
| 244 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an
object with external array elements"], |
| 245 redef_external_array_element: ["Cannot redefine a property of an object wi
th external array elements"], |
244 }; | 246 }; |
245 } | 247 } |
246 var message_type = %MessageGetType(message); | 248 var message_type = %MessageGetType(message); |
247 var format = kMessages[message_type]; | 249 var format = kMessages[message_type]; |
248 if (!format) return "<unknown message " + message_type + ">"; | 250 if (!format) return "<unknown message " + message_type + ">"; |
249 return FormatString(format, message); | 251 return FormatString(format, message); |
250 } | 252 } |
251 | 253 |
252 | 254 |
253 function GetLineNumber(message) { | 255 function GetLineNumber(message) { |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 throw e; | 1110 throw e; |
1109 } | 1111 } |
1110 } | 1112 } |
1111 | 1113 |
1112 | 1114 |
1113 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); | 1115 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', errorToString]); |
1114 | 1116 |
1115 // Boilerplate for exceptions for stack overflows. Used from | 1117 // Boilerplate for exceptions for stack overflows. Used from |
1116 // Isolate::StackOverflow(). | 1118 // Isolate::StackOverflow(). |
1117 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1119 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |