| Index: src/js/regexp.js
|
| diff --git a/src/js/regexp.js b/src/js/regexp.js
|
| index 2ad7e336ea8c30a7cc3c22dd35fad345f0864d09..b3305e1159de2dabb072784e26c0f5f77ad04697 100644
|
| --- a/src/js/regexp.js
|
| +++ b/src/js/regexp.js
|
| @@ -628,6 +628,10 @@ function RegExpMakeCaptureGetter(n) {
|
| // ES6 21.2.5.4.
|
| function RegExpGetGlobal() {
|
| if (!IS_REGEXP(this)) {
|
| + // TODO(littledan): Remove this RegExp compat workaround
|
| + if (this === GlobalRegExpPrototype) {
|
| + return UNDEFINED;
|
| + }
|
| throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.global");
|
| }
|
| return !!REGEXP_GLOBAL(this);
|
| @@ -639,6 +643,10 @@ function RegExpGetGlobal() {
|
| // ES6 21.2.5.5.
|
| function RegExpGetIgnoreCase() {
|
| if (!IS_REGEXP(this)) {
|
| + // TODO(littledan): Remove this RegExp compat workaround
|
| + if (this === GlobalRegExpPrototype) {
|
| + return UNDEFINED;
|
| + }
|
| throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.ignoreCase");
|
| }
|
| return !!REGEXP_IGNORE_CASE(this);
|
| @@ -650,6 +658,10 @@ function RegExpGetIgnoreCase() {
|
| // ES6 21.2.5.7.
|
| function RegExpGetMultiline() {
|
| if (!IS_REGEXP(this)) {
|
| + // TODO(littledan): Remove this RegExp compat workaround
|
| + if (this === GlobalRegExpPrototype) {
|
| + return UNDEFINED;
|
| + }
|
| throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.multiline");
|
| }
|
| return !!REGEXP_MULTILINE(this);
|
| @@ -661,6 +673,10 @@ function RegExpGetMultiline() {
|
| // ES6 21.2.5.10.
|
| function RegExpGetSource() {
|
| if (!IS_REGEXP(this)) {
|
| + // TODO(littledan): Remove this RegExp compat workaround
|
| + if (this === GlobalRegExpPrototype) {
|
| + return UNDEFINED;
|
| + }
|
| throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.source");
|
| }
|
| return REGEXP_SOURCE(this);
|
|
|