Summary: | CORS check is sometimes incorrectly failing for media loads | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | Media | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, commit-queue, eric.carlson, jer.noble, mcatanzaro | ||||||
Priority: | P1 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=158921 | ||||||||
Attachments: |
|
Description
Chris Dumez
2016-05-04 21:45:41 PDT
Created attachment 278156 [details]
WIP Patch
Comment on attachment 278156 [details] WIP Patch View in context: https://bugs.webkit.org/attachment.cgi?id=278156&action=review > Source/WebCore/loader/MediaResourceLoader.cpp:73 > + if (updatedRequest.isConditional() && corsPolicy == PotentiallyCrossOriginEnabled) { We shouldn't need to check if a request is conditional. Just make it unconditional, which won't do anything if it is not conditional. This will reduce iterating. We also don't need to make a new ResourceRequest for non-cors requests. Comment on attachment 278156 [details] WIP Patch View in context: https://bugs.webkit.org/attachment.cgi?id=278156&action=review >> Source/WebCore/loader/MediaResourceLoader.cpp:73 >> + if (updatedRequest.isConditional() && corsPolicy == PotentiallyCrossOriginEnabled) { > > We shouldn't need to check if a request is conditional. Just make it unconditional, which won't do anything if it is not conditional. This will reduce iterating. > We also don't need to make a new ResourceRequest for non-cors requests. Yes, I thought about calling makeUnconditional() directly as well. I have it done locally already. It is true we do not have to copy the request in the non-CORS case, it is just easier to write this way. Created attachment 278193 [details]
Patch
Comment on attachment 278193 [details] Patch Clearing flags on attachment: 278193 Committed r200493: <http://trac.webkit.org/changeset/200493> All reviewed patches have been landed. Closing bug. This test is timing out for GTK, see bug #158921. |