Bug 157947 - Modern IDB: Properly handle blobs in Workers
Summary: Modern IDB: Properly handle blobs in Workers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117
  Show dependency treegraph
 
Reported: 2016-05-20 09:56 PDT by Brady Eidson
Modified: 2016-06-04 10:19 PDT (History)
4 users (show)

See Also:


Attachments
Patch v1 (19.10 KB, patch)
2016-05-20 14:50 PDT, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff
Patch for landing (19.33 KB, patch)
2016-05-20 15:52 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-05-20 09:56:56 PDT
Modern IDB: Properly handle writing blobs from Workers

All of the blob writing code that's kicked off from IDBTransaction::putOrAddOnServer presumes that callbacks should come to the main thread.

That's wrong - they should come to whatever thread IDBTransaction::putOrAddOnServer was called on (possibly the worker thread)
Comment 1 Brady Eidson 2016-05-20 09:57:18 PDT
Noticed while working on https://bugs.webkit.org/show_bug.cgi?id=157525, though I don't think it's the cause of https://bugs.webkit.org/show_bug.cgi?id=157525
Comment 2 Brady Eidson 2016-05-20 14:50:09 PDT
Created attachment 279503 [details]
Patch v1
Comment 3 Alex Christensen 2016-05-20 15:09:58 PDT
Comment on attachment 279503 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=279503&action=review

> Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:950
> +    // If this transaction is on a worker thread, we must write the blobs to disk synchronously

This is not ideal, but it's not catastrophic because we're already on a worker thread.  Put a FIXME that says with future refactoring and c++14 lambda passing.
Comment 4 Brady Eidson 2016-05-20 15:52:54 PDT
Created attachment 279509 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2016-05-20 16:14:14 PDT
Comment on attachment 279509 [details]
Patch for landing

Clearing flags on attachment: 279509

Committed r201232: <http://trac.webkit.org/changeset/201232>