[ES6] RegExp.prototype.@@replace should use @isObject instead of `instanceof` for...
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 11:36:26 +0000 (11:36 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 11:36:26 +0000 (11:36 +0000)
commit70ab3ee162d74286f092eb2e472a8c2d5aca32ea
tree8671a8300fc4040063023de9a8ab3b8a4d6cdeec
parent1830e7658a5c345bcf758d5f1884dc962b9269c5
[ES6] RegExp.prototype.@@replace should use @isObject instead of `instanceof` for object guard
https://bugs.webkit.org/show_bug.cgi?id=157124

Reviewed by Keith Miller.

Use @isObject instead of `instanceof @Object`.
The `instanceof` check is not enough to check Object Type.
This fix itself is the same to r199647, and this patch is for RegExp.prototype.@@replace.

* builtins/RegExpPrototype.js:
(replace):
* tests/stress/regexp-replace-in-other-realm-should-work.js: Added.
(shouldBe):
* tests/stress/regexp-replace-should-work-with-objects-not-inheriting-object-prototype.js: Added.
(shouldBe):
(regexp.exec):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/RegExpPrototype.js
Source/JavaScriptCore/tests/stress/regexp-replace-in-other-realm-should-work.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/regexp-replace-should-work-with-objects-not-inheriting-object-prototype.js [new file with mode: 0644]