[Fetch] Use @isArray instead of `instanceof @Array`
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 08:01:07 +0000 (08:01 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 08:01:07 +0000 (08:01 +0000)
commit50d201d4af395f6c219361ab58eac3e1c71b2607
treede997ad58ee90dd6ef8d1858fc5c5f6b6f4a56e5
parent7ee6ed5cb7048ac64da20706ad9980a4c1264602
[Fetch] Use @isArray instead of `instanceof @Array`
https://bugs.webkit.org/show_bug.cgi?id=156682

Reviewed by Alex Christensen.

Source/WebCore:

Currently, we query whether the given value is Array by using `instanceof @Array`.
But it is not enough; Array from the other realm should be accepted. And Array
not inheriting @Array should be also accepted.

Test: fetch/header-constructor-is-array.html

* Modules/fetch/FetchHeaders.js:
(initializeFetchHeaders):

LayoutTests:

* fetch/header-constructor-is-array-expected.txt: Added.
* fetch/header-constructor-is-array.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fetch/header-constructor-is-array-expected.txt [new file with mode: 0644]
LayoutTests/fetch/header-constructor-is-array.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchHeaders.js