forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mojo Blob URLs] Refactor Blob URL loading for subresources.
This changes the XHR and fetch codepaths to resolve blob URLs earlier (i.e when the request is created rather than when the fetch is made), in order to fix bugs where the blob URL is revoked after creating a request but before fetching. This also addresses race conditions between revoking blob URLs and fetching them by resolving a blob URL as soon as possible for subresource requests. Not addressed yet are navigation and download requests, that will be done in follow ups. Bug: 800901, 800898, 695031, 807435 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: Ifd5eb11abaf04c091c51e607fdaeafa0c89bc1a9 Reviewed-on: https://chromium-review.googlesource.com/893606 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#535845}
- Loading branch information
1 parent
ce86491
commit 20c2e29
Showing
36 changed files
with
278 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
third_party/WebKit/LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is for testing blob URLs over mojo. |
6 changes: 6 additions & 0 deletions
6
...ests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/cross-global-revoke.sub-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
PASS It is possible to revoke same-origin blob URLs from different frames. | ||
PASS It is possible to revoke same-origin blob URLs from a different worker global. | ||
PASS It is not possible to revoke cross-origin blob URLs. | ||
Harness: the test ran to completion. | ||
|
18 changes: 18 additions & 0 deletions
18
...youtTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/url-with-fetch.any-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
This is a testharness.js-based test. | ||
PASS Blob URLs can be used in fetch | ||
PASS fetch with a fragment should succeed | ||
PASS fetch of a revoked URL should fail | ||
PASS Only exact matches should revoke URLs, using fetch | ||
PASS Appending a query string should cause fetch to fail | ||
PASS Appending a path should cause fetch to fail | ||
PASS fetch with method "HEAD" should fail | ||
PASS fetch with method "POST" should fail | ||
PASS fetch with method "DELETE" should fail | ||
PASS fetch with method "OPTIONS" should fail | ||
PASS fetch with method "PUT" should fail | ||
PASS fetch with method "CUSTOM" should fail | ||
PASS fetch should return Content-Type from Blob | ||
PASS Revoke blob URL after creating Request, will fetch | ||
PASS Revoke blob URL after calling fetch, fetch should succeed | ||
Harness: the test ran to completion. | ||
|
17 changes: 17 additions & 0 deletions
17
...LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/url-with-xhr.any-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
This is a testharness.js-based test. | ||
PASS Blob URLs can be used in XHR | ||
PASS XHR with a fragment should succeed | ||
PASS XHR of a revoked URL should fail | ||
PASS Only exact matches should revoke URLs, using XHR | ||
PASS Appending a query string should cause XHR to fail | ||
PASS Appending a path should cause XHR to fail | ||
PASS XHR with method "HEAD" should fail | ||
PASS XHR with method "POST" should fail | ||
PASS XHR with method "DELETE" should fail | ||
PASS XHR with method "OPTIONS" should fail | ||
PASS XHR with method "PUT" should fail | ||
PASS XHR with method "CUSTOM" should fail | ||
PASS XHR should return Content-Type from Blob | ||
PASS Revoke blob URL after open(), will fetch | ||
Harness: the test ran to completion. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.