Commit efcd023e authored by littledan's avatar littledan Committed by Commit bot

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}
parent 22be7843
......@@ -693,9 +693,6 @@ utils.InstallGetter(GlobalRegExp.prototype, 'ignoreCase', RegExpGetIgnoreCase);
utils.InstallGetter(GlobalRegExp.prototype, 'multiline', RegExpGetMultiline);
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
// value is set the value it is set to is coerced to a string.
// Getter and setter for the input.
......
......@@ -40,3 +40,5 @@ assertEquals(["x", "x"], re.exec("axyb"));
re.compile("(y)");
assertEquals(["y", "y"], re.exec("axyb"));
assertEquals(2, re.compile.length);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment