Bug 155886

Summary: [Fetch API] Add basic loading of resources for Workers
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ashwinkumare994, buildbot, cdumez, commit-queue, darin, japhet, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 155953    
Bug Blocks: 151937    
Attachments:
Description Flags
Patch
none
Rebasing
none
Archive of layout-test-results from ews100 for mac-yosemite
none
Archive of layout-test-results from ews106 for mac-yosemite-wk2
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews113 for mac-yosemite
none
Patch for landing none

Description youenn fablet 2016-03-25 09:28:51 PDT
Following on bug 155637, we should add basic loading of resources for Workers.
Comment 1 youenn fablet 2016-03-25 10:09:49 PDT
Created attachment 274913 [details]
Patch
Comment 2 Alex Christensen 2016-03-25 11:03:00 PDT
Comment on attachment 274913 [details]
Patch

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

A small change with lots of test progressions!  This is great, but r- because of a small unchecked pointer issue:

> Source/WebCore/Modules/fetch/DOMWindowFetch.cpp:42
>  void DOMWindowFetch::fetch(DOMWindow& window, FetchRequest* input, const Dictionary& dictionary, DeferredWrapper&& promise)
>  {
> +    ASSERT(input);

We should make input a FetchRequest&, then we should check the pointer before calling this.  Otherwise this could lead to null pointer issues.

> Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp:43
> +void WorkerGlobalScopeFetch::fetch(WorkerGlobalScope& scope, FetchRequest* input, const Dictionary& dictionary, DeferredWrapper&& promise)
>  {
> -    promise.reject(ASCIILiteral("Fetch is not yet implemented"));
> +    ASSERT(input);

ditto
Comment 3 youenn fablet 2016-03-25 11:13:51 PDT
Comment on attachment 274913 [details]
Patch

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

>> Source/WebCore/Modules/fetch/DOMWindowFetch.cpp:42
>> +    ASSERT(input);
> 
> We should make input a FetchRequest&, then we should check the pointer before calling this.  Otherwise this could lead to null pointer issues.

Changing that requires updating the binding generator.
I agree this would be a good move.
I 'd like if possible to ship that patch before updating the binding generator.
Comment 4 Alex Christensen 2016-03-25 11:15:40 PDT
Then add null checks, early returns, and fixme comments.  Loading code with unchecked null pointers causes scary problems.
Comment 5 youenn fablet 2016-03-28 13:36:19 PDT
(In reply to comment #4)
> Then add null checks, early returns, and fixme comments.  Loading code with
> unchecked null pointers causes scary problems.

These null checks would be redundant with binding generated code.
Let's fix the binding generator then.
Comment 6 youenn fablet 2016-03-30 13:06:17 PDT
Created attachment 275214 [details]
Rebasing
Comment 7 Alex Christensen 2016-03-30 13:23:39 PDT
Comment on attachment 275214 [details]
Rebasing

r=me
Comment 8 Build Bot 2016-03-30 13:50:12 PDT
Comment on attachment 275214 [details]
Rebasing

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

New failing tests:
imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
Comment 9 Build Bot 2016-03-30 13:50:15 PDT
Created attachment 275217 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 10 Build Bot 2016-03-30 13:54:24 PDT
Comment on attachment 275214 [details]
Rebasing

Attachment 275214 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1071250

New failing tests:
imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
Comment 11 Build Bot 2016-03-30 13:54:27 PDT
Created attachment 275218 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 12 Build Bot 2016-03-30 13:59:07 PDT
Comment on attachment 275214 [details]
Rebasing

Attachment 275214 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1071247

New failing tests:
imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
Comment 13 Build Bot 2016-03-30 13:59:11 PDT
Created attachment 275219 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.10.5
Comment 14 Build Bot 2016-03-30 13:59:41 PDT
Comment on attachment 275214 [details]
Rebasing

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

New failing tests:
imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
Comment 15 Build Bot 2016-03-30 13:59:45 PDT
Created attachment 275220 [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 16 youenn fablet 2016-03-31 03:03:45 PDT
Created attachment 275272 [details]
Patch for landing
Comment 17 youenn fablet 2016-03-31 03:05:17 PDT
(In reply to comment #14)
> Comment on attachment 275214 [details]
> Rebasing
> 
> Attachment 275214 [details] did not pass mac-debug-ews (mac):
> Output: http://webkit-queues.webkit.org/results/1071230
> 
> New failing tests:
> imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html

Mac HTTP backend seems to add a Content-Length: 0 header, while soup backend does not.
I added a specific GTK baseline for that test in the landing patch.
Comment 18 WebKit Commit Bot 2016-03-31 04:05:09 PDT
Comment on attachment 275272 [details]
Patch for landing

Clearing flags on attachment: 275272

Committed r198891: <http://trac.webkit.org/changeset/198891>
Comment 19 WebKit Commit Bot 2016-03-31 04:05:16 PDT
All reviewed patches have been landed.  Closing bug.