Skip to content

Extracting text from a Blob within a transaction panics #16

Open
@ctm

Description

@ctm

I've been using indexed-db for a while to support client-side uploads of assets. It worked great for image files. However, when I tried to support uploading of CSS files, I tried to get the text from the Blob using the Blob::text method and it panicked when I callted text() within the transaction where I was calling get_all. Moving the text() call to outside the transaction works fine, so my code no longer panics, but I assume you want to know about the panic.

I've put together a trunk using small example. The README.md explains a bit more and includes these instructions for running it:

Once it's running, click on the Choose File button to "upload" a file to your Browser (i.e., this is client-side only upload; you're not sending anything to a server). Then—after uploading a file—restart the app by refreshing the page. In the JavaScript console, you should see a Transaction blocked without any request under way panic followed by a back-trace (at least until the indexed-db bug has been fixed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions