Bug 156640 - Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files
Summary: Modern IDB (Blob support): When reading Blobs from the database, grant the Ne...
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 143193
  Show dependency treegraph
 
Reported: 2016-04-15 13:17 PDT by Brady Eidson
Modified: 2016-04-18 23:01 PDT (History)
5 users (show)

See Also:


Attachments
Patch v1 (29.60 KB, patch)
2016-04-18 21:45 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-04-15 13:17:57 PDT
Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files
Comment 1 Brady Eidson 2016-04-18 21:45:40 PDT
Created attachment 276690 [details]
Patch v1
Comment 2 WebKit Commit Bot 2016-04-18 21:47:07 PDT
Attachment 276690 [details] did not pass style-queue:


ERROR: Source/WebKit2/DatabaseProcess/DatabaseProcess.h:80:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/DatabaseProcess/DatabaseProcess.h:130:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:408:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 3 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2016-04-18 21:56:10 PDT
Comment on attachment 276690 [details]
Patch v1

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

> Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:420
> +    if (auto handler = m_sandboxExtensionForBlobsCompletionHandlers.take(requestID))
> +        handler(handles);

else ASSERT_NOT_REACHED()?
Comment 4 Brady Eidson 2016-04-18 22:04:47 PDT
(In reply to comment #3)
> Comment on attachment 276690 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=276690&action=review
> 
> > Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:420
> > +    if (auto handler = m_sandboxExtensionForBlobsCompletionHandlers.take(requestID))
> > +        handler(handles);
> 
> else ASSERT_NOT_REACHED()?

Bizarrely, no! A common trap that can be fallen into in MP-IPC-land

If the DatabaseProcess crashes while a request is outstanding, and then is relaunched to receive completion for this request ID, it will have no record of this request ID, which is fine.
Comment 5 WebKit Commit Bot 2016-04-18 23:01:50 PDT
Comment on attachment 276690 [details]
Patch v1

Clearing flags on attachment: 276690

Committed r199708: <http://trac.webkit.org/changeset/199708>
Comment 6 WebKit Commit Bot 2016-04-18 23:01:55 PDT
All reviewed patches have been landed.  Closing bug.