Bug 178926

Summary: Plumbing for handling Service Worker scripts failing to evaluate
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, rniwa, simon.fraser, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
buildbot: commit-queue-
Archive of layout-test-results from ews102 for mac-elcapitan
none
Archive of layout-test-results from ews115 for mac-elcapitan
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
none
Another EWS run
none
For EWS
none
Patch
none
Patch none

Description Brady Eidson 2017-10-27 01:13:50 PDT
Reject SW registrations where the script fails to evaluate
Comment 1 Brady Eidson 2017-10-27 01:20:30 PDT
Created attachment 325136 [details]
WIP

Quick EWS run to verify no change in current tested behavior while I work on test for the new behavior
Comment 2 Build Bot 2017-10-27 02:21:20 PDT
Comment on attachment 325136 [details]
WIP

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

New failing tests:
fast/workers/worker-script-error.html
http/tests/workers/worker-importScriptsOnError.html
Comment 3 Build Bot 2017-10-27 02:21:21 PDT
Created attachment 325143 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-10-27 02:41:30 PDT
Comment on attachment 325136 [details]
WIP

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

New failing tests:
fast/workers/worker-script-error.html
http/tests/workers/worker-importScriptsOnError.html
Comment 5 Build Bot 2017-10-27 02:41:31 PDT
Created attachment 325145 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 Build Bot 2017-10-27 03:10:11 PDT
Comment on attachment 325136 [details]
WIP

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

New failing tests:
fast/workers/worker-script-error.html
http/tests/workers/worker-importScriptsOnError.html
Comment 7 Build Bot 2017-10-27 03:10:13 PDT
Created attachment 325147 [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.12.6
Comment 8 Build Bot 2017-10-27 04:32:29 PDT
Comment on attachment 325136 [details]
WIP

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

New failing tests:
fast/workers/worker-script-error.html
http/tests/workers/worker-importScriptsOnError.html
Comment 9 Build Bot 2017-10-27 04:32:30 PDT
Created attachment 325148 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 10 Brady Eidson 2017-10-27 09:50:19 PDT
Subtle mistake! New patch incoming.
Comment 11 Brady Eidson 2017-10-27 09:59:55 PDT
Created attachment 325170 [details]
Another EWS run
Comment 12 Chris Dumez 2017-10-27 10:12:37 PDT
(In reply to Brady Eidson from comment #11)
> Created attachment 325170 [details]
> Another EWS run

Fails to apply. Might be because of me, sorry.
Comment 13 Brady Eidson 2017-10-27 13:27:09 PDT
Created attachment 325189 [details]
For EWS
Comment 14 Build Bot 2017-10-27 13:31:34 PDT
Attachment 325189 [details] did not pass style-queue:


ERROR: Source/WebCore/workers/service/context/SWContextManager.h:47:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Brady Eidson 2017-10-27 13:41:12 PDT
(In reply to Chris Dumez from comment #12)
> (In reply to Brady Eidson from comment #11)
> > Created attachment 325170 [details]
> > Another EWS run
> 
> Fails to apply. Might be because of me, sorry.

YUP.

That's fine.
Comment 16 Brady Eidson 2017-10-27 15:46:16 PDT
Going to back burner this, because it's actually not right (We just re-read the Install algorithm and found some out of orderness)

It will be needed soon, though.
Comment 17 Brady Eidson 2017-11-01 09:43:47 PDT
Rename: Handling SW scripts failing to evaluate
Comment 18 Brady Eidson 2017-11-01 13:28:44 PDT
Created attachment 325623 [details]
Patch
Comment 19 Chris Dumez 2017-11-01 13:48:06 PDT
Comment on attachment 325623 [details]
Patch

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

r=me assuming the bots are happy.

> Source/WebCore/workers/WorkerThread.cpp:190
> +    if (m_hasEvaluateCallback) {

This is just to avoid a dispatch? If so, I am personally not sure it is worth an extra member. We could do inside the lambda:
if (evaluateCallback)
    evaluateCallback(message);
Comment 20 Brady Eidson 2017-11-01 13:55:26 PDT
Created attachment 325628 [details]
Patch
Comment 21 WebKit Commit Bot 2017-11-01 14:23:55 PDT
Comment on attachment 325628 [details]
Patch

Clearing flags on attachment: 325628

Committed r224295: <https://trac.webkit.org/changeset/224295>
Comment 22 WebKit Commit Bot 2017-11-01 14:23:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 23 Radar WebKit Bug Importer 2017-11-15 12:43:37 PST
<rdar://problem/35568025>