Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES6] Use @isObject to check Object Type instead of using instanceof
https://bugs.webkit.org/show_bug.cgi?id=156676 Reviewed by Darin Adler. Use @isObject instead of `instanceof @Object`. The `instanceof` check is not enough to check Object Type. For example, given 2 realms, the object created in one realm does not inherit the Object of another realm. Another example is that the object which does not inherit Object. This object can be easily created by calling `Object.create(null)`. * builtins/RegExpPrototype.js: (match): * jsc.cpp: (GlobalObject::finishCreation): (functionCreateGlobalObject): * tests/stress/regexp-match-in-other-realm-should-work.js: Added. (shouldBe): * tests/stress/regexp-match-should-work-with-objects-not-inheriting-object-prototype.js: Added. (shouldBe): (regexp.exec): Canonical link: https://commits.webkit.org/174782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 54 additions and 1 deletion.
- +11 −0 ...aScriptCore/tests/stress/regexp-match-should-work-with-objects-not-inheriting-object-prototype.js