Author: [email protected]
Date: Fri Feb 27 06:02:00 2009
New Revision: 1391
Modified:
branches/bleeding_edge/src/regexp-delay.js
branches/bleeding_edge/test/mjsunit/regexp-static.js
Log:
Fix regression in regexp-caching.html
Review URL: http://codereview.chromium.org/27273
Modified: branches/bleeding_edge/src/regexp-delay.js
==============================================================================
--- branches/bleeding_edge/src/regexp-delay.js (original)
+++ branches/bleeding_edge/src/regexp-delay.js Fri Feb 27 06:02:00 2009
@@ -318,7 +318,8 @@
return IS_UNDEFINED(regExpInput) ? "" : regExpInput;
}
function RegExpSetInput(string) {
- lastMatchInfo[lastMatchInfo[REGEXP_NUMBER_OF_CAPTURES] + 2] = string;
+ lastMatchInfo[lastMatchInfo[REGEXP_NUMBER_OF_CAPTURES] + 2] =
+ ToString(string);
};
%DefineAccessor($RegExp, 'input', GETTER, RegExpGetInput, DONT_DELETE);
Modified: branches/bleeding_edge/test/mjsunit/regexp-static.js
==============================================================================
--- branches/bleeding_edge/test/mjsunit/regexp-static.js (original)
+++ branches/bleeding_edge/test/mjsunit/regexp-static.js Fri Feb 27
06:02:00 2009
@@ -132,3 +132,8 @@
re = /(.)/g;
function f() { return RegExp.$1; };
assertEquals('abcd', 'abcd'.replace(re, f));
+
+RegExp.multiline = "foo";
+assertTrue(typeof RegExp.multiline == typeof Boolean(), "RegExp.multiline
coerces values to booleans");
+RegExp.input = Number();
+assertTrue(typeof RegExp.input == typeof String(), "RegExp.input coerces
values to booleans");
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---