Bug 178168 - [JSC] Retry module fetching if previous request fails
Summary: [JSC] Retry module fetching if previous request fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks: 147340
  Show dependency treegraph
 
Reported: 2017-10-11 06:24 PDT by Yusuke Suzuki
Modified: 2017-11-15 09:44 PST (History)
9 users (show)

See Also:


Attachments
Patch (15.28 KB, patch)
2017-10-16 07:24 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (16.47 KB, patch)
2017-10-19 04:11 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff
Patch (16.55 KB, patch)
2017-11-09 19:22 PST, Yusuke Suzuki
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (2.86 MB, application/zip)
2017-11-09 20:14 PST, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-elcapitan (2.33 MB, application/zip)
2017-11-09 20:28 PST, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (3.00 MB, application/zip)
2017-11-09 20:30 PST, Build Bot
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.59 MB, application/zip)
2017-11-09 20:42 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-10-11 06:24:57 PDT
module instance will be shared by URL's uniqueness.
But if one request fails to fetch module, the other one should retry to fetch modules.

<script type="module" src="http://example.com/A.js" integrity="invalid integrity hash"></script>
<script type="module" src="http://example.com/A.js" integrity="correct integrity hash"></script>

In the above case, second one should succeed. This is a spec change from the last implemented one.
https://html.spec.whatwg.org/#fetch-a-single-module-script
Comment 1 Yusuke Suzuki 2017-10-16 07:24:07 PDT
Created attachment 323893 [details]
Patch
Comment 2 Yusuke Suzuki 2017-10-19 04:11:46 PDT
Created attachment 324219 [details]
Patch
Comment 3 Saam Barati 2017-11-08 10:57:10 PST
Comment on attachment 324219 [details]
Patch

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

r=me

> Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js:220
> +function requestSatisfy(entry, parameters, fetcher, visited)

Should we just use a default parameter value for visited instead of providing new @Set at a few call sites?
Comment 4 Yusuke Suzuki 2017-11-09 19:20:14 PST
Comment on attachment 324219 [details]
Patch

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

>> Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js:220
>> +function requestSatisfy(entry, parameters, fetcher, visited)
> 
> Should we just use a default parameter value for visited instead of providing new @Set at a few call sites?

Sounds nice!
Comment 5 Yusuke Suzuki 2017-11-09 19:22:12 PST
Created attachment 326533 [details]
Patch
Comment 6 Build Bot 2017-11-09 19:24:00 PST
This patch modifies the JS builtins code generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-builtins-generator-tests --reset-results`)
Comment 7 Build Bot 2017-11-09 20:14:40 PST
Comment on attachment 326533 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 8 Build Bot 2017-11-09 20:14:42 PST
Created attachment 326539 [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 9 Build Bot 2017-11-09 20:28:30 PST
Comment on attachment 326533 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 10 Build Bot 2017-11-09 20:28:32 PST
Created attachment 326542 [details]
Archive of layout-test-results from ews113 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 11 Build Bot 2017-11-09 20:30:16 PST
Comment on attachment 326533 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 12 Build Bot 2017-11-09 20:30:18 PST
Created attachment 326543 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 13 Build Bot 2017-11-09 20:42:33 PST
Comment on attachment 326533 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 14 Build Bot 2017-11-09 20:42:35 PST
Created attachment 326544 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 15 Yusuke Suzuki 2017-11-09 21:16:43 PST
Hm, default parameters need to extend builtin generators to accept them. In the meantime, I do not use it in this patch.
Comment 16 Yusuke Suzuki 2017-11-09 21:28:46 PST
Committed r224662: <https://trac.webkit.org/changeset/224662>
Comment 17 Radar WebKit Bug Importer 2017-11-15 09:44:55 PST
<rdar://problem/35562356>