New issue
Advanced search Search tips

Issue 764130 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 717798


Participants' hotlists:
dmurph-iterative-side-tasks


Sign in to add a comment

[IndexedDB] Have mojo-only integration between IDB and blobs.

Project Member Reported by dmu...@chromium.org, Sep 11 2017

Issue description

This means we could de-couple ourselves from the IO thread / being on the same thread as the blob system.

Tasks:
* Create a way to copy blob data to a file in mojo, which hopefully will have an optimization for file-to-file copying.
* Use this instead of the url request reader path that we currently have in the backing store.
 

Comment 1 by dmu...@chromium.org, May 15 2018

Summary: [IndexedDB] Have mojo-only integration between IDB and blobs. (was: [IndexedDB] Modifying an IDB value with embedded blob always re-writes the blob)

Comment 2 by dmu...@chromium.org, May 15 2018

Description: Show this description

Comment 3 by dmu...@chromium.org, May 15 2018

Cc: c...@chromium.org mek@chromium.org

Comment 4 by mek@chromium.org, May 15 2018

Re the file-to-file copy, so far I haven't been able to come up with a satisfactory method of doing so... What I was originally thinking was to add to the mojo Blob interface a something like a "SaveToFile(mojo_base.mojom.File)" method. That would all be nice and secure even if a renderer can call it (since you can only write to files you can open somehow, and by having access to the BlobPtr you were already granted access to the blob contents), but it doesn't actually let us optimize the file-to-file copy case. The Blob implementation of that method might know it is itself a single file, but only having an open file pointer isn't good enough to be able to do an efficient file-to-file copy (i.e. the base::CopyFile method needs file paths, not files. In particularly because the underlying windows CopyFile API needs paths).

But I can't think of anything that involves passing a file path over the mojo pipe that would still be secure (as we don't want to let renderers that have a BlobPtr be able to just write that blob to arbitrary paths on disk). I guess having some static global base::UnguessableToken in the browser process that IDB code could pass together with a path to a Blob mojo method would work, but would also be really ugly (and if we ever move to IDB in the renderer process of course none of this would work either).
</ramble>

Comment 5 by pwnall@chromium.org, May 16 2018

Cc: -cos...@gmail.com pwnall@chromium.org

Comment 6 by dmu...@chromium.org, May 16 2018

Blocking: 717798

Sign in to add a comment