Fix RegExp.prototype.compile.length to be 2
SpiderMonkey switched to 2, test262 tests for 2, and 2 is a reasonable, natural value. R=yangguo Review URL: https://codereview.chromium.org/1616233002 Cr-Commit-Position: refs/heads/master@{#33504}
This commit is contained in:
parent
22be78430a
commit
efcd023e4a
@ -693,9 +693,6 @@ utils.InstallGetter(GlobalRegExp.prototype, 'ignoreCase', RegExpGetIgnoreCase);
|
|||||||
utils.InstallGetter(GlobalRegExp.prototype, 'multiline', RegExpGetMultiline);
|
utils.InstallGetter(GlobalRegExp.prototype, 'multiline', RegExpGetMultiline);
|
||||||
utils.InstallGetter(GlobalRegExp.prototype, 'source', RegExpGetSource);
|
utils.InstallGetter(GlobalRegExp.prototype, 'source', RegExpGetSource);
|
||||||
|
|
||||||
// The length of compile is 1 in SpiderMonkey.
|
|
||||||
%FunctionSetLength(GlobalRegExp.prototype.compile, 1);
|
|
||||||
|
|
||||||
// The properties `input` and `$_` are aliases for each other. When this
|
// The properties `input` and `$_` are aliases for each other. When this
|
||||||
// value is set the value it is set to is coerced to a string.
|
// value is set the value it is set to is coerced to a string.
|
||||||
// Getter and setter for the input.
|
// Getter and setter for the input.
|
||||||
|
@ -40,3 +40,5 @@ assertEquals(["x", "x"], re.exec("axyb"));
|
|||||||
re.compile("(y)");
|
re.compile("(y)");
|
||||||
|
|
||||||
assertEquals(["y", "y"], re.exec("axyb"));
|
assertEquals(["y", "y"], re.exec("axyb"));
|
||||||
|
|
||||||
|
assertEquals(2, re.compile.length);
|
||||||
|
Loading…
Reference in New Issue
Block a user