Bug 178673

Summary: Enable ServiceWorker to fetch resources
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, buildbot, cdumez, cgarcia, commit-queue, dbates, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Patch
none
Patch
none
Patch
none
Patch
none
Rebasing
none
Fixing didFinish/didFail
none
Patch for landing none

Description youenn fablet 2017-10-23 10:56:52 PDT
Currently, it posts a task to the main thread that does nothing.
Comment 1 youenn fablet 2017-10-23 15:47:53 PDT
Created attachment 324601 [details]
Patch
Comment 2 youenn fablet 2017-10-23 16:04:34 PDT
Created attachment 324605 [details]
Patch
Comment 3 youenn fablet 2017-10-23 16:33:05 PDT
Created attachment 324608 [details]
Patch
Comment 4 Build Bot 2017-10-23 17:48:56 PDT
Comment on attachment 324608 [details]
Patch

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

New failing tests:
http/tests/workers/service/service-worker-fetch.https.html
Comment 5 Build Bot 2017-10-23 17:48:57 PDT
Created attachment 324619 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 6 youenn fablet 2017-10-23 19:31:30 PDT
Created attachment 324627 [details]
Patch
Comment 7 youenn fablet 2017-10-24 09:27:28 PDT
Created attachment 324678 [details]
Patch
Comment 8 Build Bot 2017-10-24 09:29:26 PDT
Attachment 324678 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:35:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 youenn fablet 2017-10-24 11:28:30 PDT
Comment on attachment 324678 [details]
Patch

Will fix GTK?WPE, Putting it r? for early feedback request
Comment 10 Alex Christensen 2017-10-24 11:33:42 PDT
Comment on attachment 324678 [details]
Patch

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

> Source/WebCore/loader/FrameLoaderClient.h:121
> +    virtual uint64_t pageID() const { return 0; }
> +    virtual uint64_t frameID() const { return 0; }

I don't think we should have a default implementation of these.  This class is virtual anyways.
Comment 11 youenn fablet 2017-10-24 11:38:41 PDT
Created attachment 324689 [details]
Patch
Comment 12 youenn fablet 2017-10-24 12:58:42 PDT
Created attachment 324704 [details]
Patch
Comment 13 Build Bot 2017-10-24 13:01:33 PDT
Attachment 324704 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:35:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 youenn fablet 2017-10-24 16:42:36 PDT
Created attachment 324752 [details]
Rebasing
Comment 15 Build Bot 2017-10-24 16:43:46 PDT
Attachment 324752 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:36:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 youenn fablet 2017-10-24 16:45:41 PDT
Created attachment 324754 [details]
Fixing didFinish/didFail
Comment 17 Build Bot 2017-10-24 16:47:52 PDT
Attachment 324754 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:36:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 37 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 youenn fablet 2017-10-24 19:15:52 PDT
This patch is moving frameID/pageID to FrameLoaderClient.
A request is associated to a client which can be a document or worker scope typically.
We might want to move from frameID/pageID to something like a clientID in the future.

This patch also introduces ServiceWorkerProcessProxy in an attempt towards an independent ServiceWorkerProcess.
Comment 19 Brady Eidson 2017-10-25 09:57:43 PDT
Comment on attachment 324754 [details]
Fixing didFinish/didFail

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

Make Windows build.

> Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.cpp:75
> +    }
> +    PAL::SessionID sessionID() const final { return m_sessionID; }

Empty line between these

> Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:207
> +    ASSERT_NOT_REACHED();

RELEASE_*

> Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:219
> +    ASSERT_NOT_REACHED();
> +    return 0;
> +}
> +
> +PAL::SessionID WebFrameLoaderClient::sessionID() const
> +{
> +    ASSERT_NOT_REACHED();

Ditto
Comment 20 youenn fablet 2017-10-25 12:49:00 PDT
Created attachment 324869 [details]
Patch for landing
Comment 21 Build Bot 2017-10-25 12:50:13 PDT
Attachment 324869 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:36:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 22 WebKit Commit Bot 2017-10-25 14:17:50 PDT
Comment on attachment 324869 [details]
Patch for landing

Clearing flags on attachment: 324869

Committed r223981: <https://trac.webkit.org/changeset/223981>
Comment 23 WebKit Commit Bot 2017-10-25 14:17:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 24 Radar WebKit Bug Importer 2017-11-15 13:07:47 PST
<rdar://problem/35568839>