Bug 157238 - Update XMLHttpRequest to use enum class instead of string for enumeration
Summary: Update XMLHttpRequest to use enum class instead of string for enumeration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-30 16:07 PDT by Darin Adler
Modified: 2016-04-30 21:49 PDT (History)
3 users (show)

See Also:


Attachments
Patch (21.04 KB, patch)
2016-04-30 16:21 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews113 for mac-yosemite (1.65 MB, application/zip)
2016-04-30 17:51 PDT, Build Bot
no flags Details
Patch (22.16 KB, patch)
2016-04-30 20:29 PDT, Darin Adler
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2016-04-30 16:07:08 PDT
Update XMLHttpRequest to use enum class instead of string for enumeration
Comment 1 Darin Adler 2016-04-30 16:21:49 PDT
Created attachment 277834 [details]
Patch
Comment 2 WebKit Commit Bot 2016-04-30 16:23:12 PDT
Attachment 277834 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2016-04-30 17:51:40 PDT
Comment on attachment 277834 [details]
Patch

Attachment 277834 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1247419

New failing tests:
fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request.html
fast/xmlhttprequest/xmlhttprequest-responsetype-abort.html
http/tests/xmlhttprequest/response-json-and-readystate.html
imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-get-twice.htm
imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html
fast/xmlhttprequest/xmlhttprequest-set-responsetype.html
fast/files/xhr-response-blob.html
fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html
fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer.html
fast/xmlhttprequest/xmlhttprequest-responsetype-text.html
fast/xmlhttprequest/xmlhttprequest-responsetype-document.html
fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html
imported/w3c/web-platform-tests/XMLHttpRequest/response-invalid-responsetype.htm
imported/w3c/web-platform-tests/XMLHttpRequest/response-json.htm
fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html
imported/w3c/web-platform-tests/XMLHttpRequest/responsetype.html
Comment 4 Build Bot 2016-04-30 17:51:44 PDT
Created attachment 277837 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Darin Adler 2016-04-30 20:29:16 PDT
Created attachment 277838 [details]
Patch
Comment 6 Darin Adler 2016-04-30 20:31:05 PDT
Everything was working perfectly, but there was an assertion in debug builds because generated code was using ASCIILiteral("") to make an empty string. That’s fixed now.
Comment 7 Chris Dumez 2016-04-30 20:58:41 PDT
Comment on attachment 277838 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277838&action=review

r=me

> Source/WebCore/xml/XMLHttpRequest.cpp:-1188
> -    else if (m_responseTypeCode == ResponseTypeArrayBuffer || m_responseTypeCode == ResponseTypeBlob) {

Should we ASSERT instead?
Comment 8 Darin Adler 2016-04-30 21:48:44 PDT
(In reply to comment #7)
> Should we ASSERT instead?

I considered it. We could but I don’t think there’s really value in that. There is a code path for text type responses and another for binary, no need to list the different types of binary responses.
Comment 9 Darin Adler 2016-04-30 21:49:37 PDT
Committed r200300: <http://trac.webkit.org/changeset/200300>