New issue
Advanced search Search tips

Issue 695031 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Proj-Servicification

Blocked on:
issue 800901

Blocking:
issue 611935
issue 800986



Sign in to add a comment

XMLHttpRequest/fetch and blob URLs seems broken

Project Member Reported by annevank...@gmail.com, Feb 22 2017

Issue description

Components: Blink>Network>XHR

Comment 2 by ricea@chromium.org, Mar 3 2017

Labels: Hotlist-Interop
Owner: yhirano@chromium.org
Status: Assigned (was: Untriaged)
Tentatively assigning to yhirano. yhirano: feel free to unassign or reassign it.
Cc: yhirano@chromium.org
Components: Blink>FileAPI
Owner: dmu...@chromium.org
dmurph@, can you take a look?
huh. Got it. So we should be grabbing the blob right away.

Comment 5 by mek@chromium.org, Oct 13 2017

Blocking: 611935
Components: Blink>Loader
Note that while currently XHR is the only place where it is observable that we don't resolve Blob URLs until we actually start fetching, with mojo blobs and/or mojo network service this becomes potentially observable for any fetch/navigation/download. Currently our revokeObjectURL IPCs are sequenced with the actual fetch/navigation/download IPCs (at least as far as I can tell), so the blob URL is still around by the time the browser process tries to resolve it, but when either half of that equation moves to mojo this will no longer be the case. So it's not just our XHR code we'd need to update to resolve the blob URLs at URL parsing time, navigations, downloads and other fetches all will need to be updated as well.

(even today the same problem already exists with Request + fetch, where creating a Request, then revoking the URL, and then starting the fetch should work according to the spec)

Comment 6 by mek@chromium.org, Oct 13 2017

(to be fair, maybe fixing this for XHR/fetch and fixing this for mojofication should be separate bugs, but I expect large overlap between the work required for both...)

Comment 7 by laforge@google.com, Nov 7 2017

Components: Internals>Network>Service

Comment 8 by laforge@google.com, Nov 7 2017

Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Comment 9 by laforge@google.com, Nov 8 2017

Components: Internals>Services>Storage
Setting Internals>Services>Storage to all children of issue 611935

Comment 10 by mek@chromium.org, Nov 30 2017

Summary: XMLHttpRequest/fetch and blob URLs seems broken (was: XMLHttpRequest and blob URLs seems broken)

Comment 11 by mek@chromium.org, Jan 10 2018

Blockedon: 800901

Comment 12 by mek@chromium.org, Jan 10 2018

Blocking: 800986
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20c2e2937980e39373edc4446369c7410aa38585

commit 20c2e2937980e39373edc4446369c7410aa38585
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Fri Feb 09 22:07:57 2018

[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}
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/renderer_blink_platform_impl.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/service_worker/service_worker_fetch_context_impl.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/NeverFixTests
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/README.txt
[add] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/cross-global-revoke.sub-expected.txt
[add] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/url-with-fetch.any-expected.txt
[add] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/LayoutTests/virtual/mojo-blob-urls/external/wpt/FileAPI/url/url-with-xhr.any-expected.txt
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fetch/FetchManager.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fetch/FetchRequestData.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fetch/FetchRequestData.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fetch/Request.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fileapi/PublicURLManager.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/fileapi/PublicURLManager.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/blob/BUILD.gn
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/loader/BUILD.gn
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptions.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/Tools/Scripts/audit-non-blink-usage.py
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/public/platform/Platform.h
[modify] https://crrev.com/20c2e2937980e39373edc4446369c7410aa38585/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Comment 14 by mek@chromium.org, Feb 13 2018

Cc: dmu...@chromium.org
Owner: mek@chromium.org
Status: Started (was: Assigned)
This is fixed with NetworkService enabled. Probably not going to bother fixing this for the non-networkservice case, but I might change my mind...

Comment 15 by dxie@chromium.org, May 17 2018

Status: Fixed (was: Started)
Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment