Make use of PrivateIdentifier to simplify Fetch Headers built-in checks
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Jul 2016 12:57:37 +0000 (12:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Jul 2016 12:57:37 +0000 (12:57 +0000)
commit4366397e3cd83510ef8486db5a63870752ea183b
tree425e8d584d4150e1c576a1a89b65ce12d3c51695
parentc86b9db33fd94946091c2c606e86c4db5807b1c2
Make use of PrivateIdentifier to simplify Fetch Headers built-in checks
https://bugs.webkit.org/show_bug.cgi?id=159554

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-09
Reviewed by Alex Christensen.

Source/WebCore:

Test: fetch/header-constructor-overriden.html
Patch does not change visible behavior.

* Modules/fetch/FetchHeaders.idl: Adding PrivateIdentifier to the Headers constructor.
* Modules/fetch/FetchHeaders.js:
(initializeFetchHeaders): Checking directly with @Headers for improved clarity.
* Modules/fetch/FetchResponse.js: Using @Headers to check whether creating a Headers object or not before
passsing it to C++ FetchResponse initialize method.
(initializeFetchResponse):
* bindings/js/WebCoreBuiltinNames.h: Adding Headers private name.

LayoutTests:

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fetch/header-constructor-overriden-expected.txt [new file with mode: 0644]
LayoutTests/fetch/header-constructor-overriden.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchHeaders.idl
Source/WebCore/Modules/fetch/FetchHeaders.js
Source/WebCore/Modules/fetch/FetchResponse.js
Source/WebCore/bindings/js/WebCoreBuiltinNames.h