| Index: src/js/regexp.js
|
| diff --git a/src/js/regexp.js b/src/js/regexp.js
|
| index 28492609234cf712edeb5045836ac7185b13f77a..ef6a4aed053b3d15f23056a64c4540112be08337 100644
|
| --- a/src/js/regexp.js
|
| +++ b/src/js/regexp.js
|
| @@ -325,10 +325,10 @@ function RegExpTest(string) {
|
| // not a '?'. But see https://code.google.com/p/v8/issues/detail?id=3560
|
| var regexp = this;
|
| var source = REGEXP_SOURCE(regexp);
|
| - if (regexp.length >= 3 &&
|
| - %_StringCharCodeAt(regexp, 0) == 46 && // '.'
|
| - %_StringCharCodeAt(regexp, 1) == 42 && // '*'
|
| - %_StringCharCodeAt(regexp, 2) != 63) { // '?'
|
| + if (source.length >= 3 &&
|
| + %_StringCharCodeAt(source, 0) == 46 && // '.'
|
| + %_StringCharCodeAt(source, 1) == 42 && // '*'
|
| + %_StringCharCodeAt(source, 2) != 63) { // '?'
|
| regexp = TrimRegExp(regexp);
|
| }
|
| // matchIndices is either null or the RegExpLastMatchInfo array.
|
|
|