RESOLVED FIXED 161609
CachedResource should efficiently construct its ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=161609
Summary CachedResource should efficiently construct its ResourceRequest
youenn fablet
Reported 2016-09-05 09:59:13 PDT
Currently it is doing a copy from a request owned by a CachedResourceRequest which is destroyed.
Attachments
Patch (79.67 KB, patch)
2016-09-05 10:04 PDT, youenn fablet
no flags
Fixing LinkLoader (80.48 KB, patch)
2016-09-05 11:53 PDT, youenn fablet
no flags
Fixing EFL compilation issue (80.52 KB, patch)
2016-09-05 12:05 PDT, youenn fablet
no flags
Fixing EFL compilation issue (80.52 KB, patch)
2016-09-05 12:22 PDT, youenn fablet
no flags
Archive of layout-test-results from ews116 for mac-yosemite (1.42 MB, application/zip)
2016-09-05 13:21 PDT, Build Bot
no flags
Rebasing (80.64 KB, patch)
2016-09-12 01:13 PDT, youenn fablet
no flags
Fixed WTFMove related FIXMEs (86.98 KB, patch)
2016-09-12 12:20 PDT, youenn fablet
no flags
Patch for landing (87.08 KB, patch)
2016-09-16 01:26 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2016-09-05 10:04:25 PDT
youenn fablet
Comment 2 2016-09-05 11:53:33 PDT
Created attachment 287972 [details] Fixing LinkLoader
youenn fablet
Comment 3 2016-09-05 12:05:58 PDT
Created attachment 287974 [details] Fixing EFL compilation issue
youenn fablet
Comment 4 2016-09-05 12:22:42 PDT
Created attachment 287978 [details] Fixing EFL compilation issue
Build Bot
Comment 5 2016-09-05 13:21:56 PDT
Comment on attachment 287978 [details] Fixing EFL compilation issue Attachment 287978 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2013557 New failing tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html
Build Bot
Comment 6 2016-09-05 13:21:59 PDT
Created attachment 287980 [details] Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
youenn fablet
Comment 7 2016-09-05 14:31:36 PDT
Comment on attachment 287978 [details] Fixing EFL compilation issue PTest failure is unrelated to this patch. I'll fix the test tomorrow
Darin Adler
Comment 8 2016-09-05 20:22:04 PDT
Comment on attachment 287978 [details] Fixing EFL compilation issue Looks like this caused a test failure: imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ Failure ]
youenn fablet
Comment 9 2016-09-06 02:00:14 PDT
(In reply to comment #8) > Comment on attachment 287978 [details] > Fixing EFL compilation issue > > Looks like this caused a test failure: > > imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ > Failure ] This test had an issue and will be fixed in landing patch for bug 161389
youenn fablet
Comment 10 2016-09-07 07:29:11 PDT
(In reply to comment #9) > (In reply to comment #8) > > Comment on attachment 287978 [details] > > Fixing EFL compilation issue > > > > Looks like this caused a test failure: > > > > imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ Failure ] Test should now be fine.
Alex Christensen
Comment 11 2016-09-07 10:01:43 PDT
This looks related: Regressions: Unexpected text-only failures (1) imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ Failure ]
youenn fablet
Comment 12 2016-09-07 10:06:30 PDT
(In reply to comment #11) > This looks related: > > Regressions: Unexpected text-only failures (1) > imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ > Failure ] This test file was running promise tests. But the promise was not returned to tstharness so the test file was done before all promises were resolved. This was fixed in bug 161389. This was noticeable here as we are starting to do some console logging stuff. Sometimes the logs happened before the test was done sometimes after, hence the flakiness. I can reupload this patch to resubmit it to EWS bots if that helps.
youenn fablet
Comment 13 2016-09-12 01:13:09 PDT
Created attachment 288559 [details] Rebasing
Alex Christensen
Comment 14 2016-09-12 09:00:20 PDT
Comment on attachment 288559 [details] Rebasing View in context: https://bugs.webkit.org/attachment.cgi?id=288559&action=review > Source/WebCore/loader/cache/CachedResourceLoader.cpp:689 > + // FIXME: We probably moved request and should not reuse it here for safety. > + // We should refactor auickly this code. > if (!request.forPreload() || policy != Use) > resource->setLoadPriority(request.priority()); Yes, we should definitely store this bool before moving it. We shouldn't land code that uses a variable we have WTFMoved from.
youenn fablet
Comment 15 2016-09-12 09:07:26 PDT
Comment on attachment 288559 [details] Rebasing View in context: https://bugs.webkit.org/attachment.cgi?id=288559&action=review >> Source/WebCore/loader/cache/CachedResourceLoader.cpp:689 >> resource->setLoadPriority(request.priority()); > > Yes, we should definitely store this bool before moving it. We shouldn't land code that uses a variable we have WTFMoved from. I saw that already in WebKit code base, maybe this should be in WebKit coding style. I can do that change in that patch, although this will make a tad more difficult to review all the changes.
youenn fablet
Comment 16 2016-09-12 12:20:52 PDT
Created attachment 288599 [details] Fixed WTFMove related FIXMEs
youenn fablet
Comment 17 2016-09-16 01:26:13 PDT
Created attachment 289049 [details] Patch for landing
WebKit Commit Bot
Comment 18 2016-09-16 01:59:03 PDT
Comment on attachment 289049 [details] Patch for landing Clearing flags on attachment: 289049 Committed r206016: <http://trac.webkit.org/changeset/206016>
WebKit Commit Bot
Comment 19 2016-09-16 01:59:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.