| Index: src/harmony-string.js
|
| diff --git a/src/harmony-string.js b/src/harmony-string.js
|
| index 8e4b9a462646470a4522c894547d2b0d81da1b6e..0b553720816a8cd86ab9deba3212c843d10ca6a1 100644
|
| --- a/src/harmony-string.js
|
| +++ b/src/harmony-string.js
|
| @@ -64,6 +64,12 @@ function StringStartsWith(searchString /* position */) { // length == 1
|
| }
|
|
|
| var s = TO_STRING_INLINE(this);
|
| +
|
| + if (IS_REGEXP(searchString)) {
|
| + throw MakeTypeError("first_argument_not_regexp",
|
| + ["String.prototype.startsWith"]);
|
| + }
|
| +
|
| var ss = TO_STRING_INLINE(searchString);
|
| var pos = 0;
|
| if (%_ArgumentsLength() > 1) {
|
| @@ -90,6 +96,12 @@ function StringEndsWith(searchString /* position */) { // length == 1
|
| }
|
|
|
| var s = TO_STRING_INLINE(this);
|
| +
|
| + if (IS_REGEXP(searchString)) {
|
| + throw MakeTypeError("first_argument_not_regexp",
|
| + ["String.prototype.endsWith"]);
|
| + }
|
| +
|
| var ss = TO_STRING_INLINE(searchString);
|
| var s_len = s.length;
|
| var pos = s_len;
|
|
|