Bug 156640

Summary: Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, ap, commit-queue, jsbell
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149117, 143193    
Attachments:
Description Flags
Patch v1 none

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.