Revision: 3978
Author: [email protected]
Date: Fri Feb 26 07:46:57 2010
Log: Add missing error message for calling functions on incompatible
receivers.
Review URL: http://codereview.chromium.org/660178
http://code.google.com/p/v8/source/detail?r=3978
Modified:
/branches/bleeding_edge/src/messages.js
/branches/bleeding_edge/src/regexp-delay.js
=======================================
--- /branches/bleeding_edge/src/messages.js Wed Feb 3 05:10:03 2010
+++ /branches/bleeding_edge/src/messages.js Fri Feb 26 07:46:57 2010
@@ -127,6 +127,7 @@
malformed_regexp: "Invalid regular expression: /%0/: %1",
unterminated_regexp: "Invalid regular expression: missing
/",
regexp_flags: "Cannot supply flags when constructing
one RegExp from another",
+ incompatible_method_receiver: "Method %0 called on incompatible
receiver %1",
invalid_lhs_in_assignment: "Invalid left-hand side in assignment",
invalid_lhs_in_for_in: "Invalid left-hand side in for-in",
invalid_lhs_in_postfix_op: "Invalid left-hand side expression in
postfix operation",
=======================================
--- /branches/bleeding_edge/src/regexp-delay.js Wed Jan 6 03:09:30 2010
+++ /branches/bleeding_edge/src/regexp-delay.js Fri Feb 26 07:46:57 2010
@@ -142,7 +142,7 @@
function RegExpExec(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError('method_called_on_incompatible',
+ throw MakeTypeError('incompatible_method_receiver',
['RegExp.prototype.exec', this]);
}
if (%_ArgumentsLength() == 0) {
@@ -199,7 +199,7 @@
// else implements.
function RegExpTest(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError('method_called_on_incompatible',
+ throw MakeTypeError('incompatible_method_receiver',
['RegExp.prototype.test', this]);
}
if (%_ArgumentsLength() == 0) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev