Bug 154400

Summary: Modern IDB: Implement client->server operations in WK2
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, commit-queue, jsbell
Priority: P2    
Version: Safari 9   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149117, 153808    
Attachments:
Description Flags
Patch v1
achristensen: review+, achristensen: commit-queue-
Patch for landing v5 none

Description Brady Eidson 2016-02-18 10:37:56 PST
Modern IDB: Implement client->server operations in WK2

Since the server can't yet reply to the client, nothing actually works, and no behavior is changed.

But that's coming *very* soon.
Comment 1 Brady Eidson 2016-02-18 10:46:17 PST
Created attachment 271670 [details]
Patch v1
Comment 2 WebKit Commit Bot 2016-02-18 10:48:31 PST
Attachment 271670 [details] did not pass style-queue:


ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:216:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:216:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:217:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
Total errors found: 3 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2016-02-18 10:55:33 PST
Comment on attachment 271670 [details]
Patch v1

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

> Source/WebCore/Modules/indexeddb/server/IDBServer.h:51
> +class IDBBackingStore;

This doesn't seem necessary.

> Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:217
> +    if (overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::NoOverwrite) &&
> +        overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::Overwrite) &&

Style bot doesn't like the &&

> Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:219
> +        // FIXME: Corrupt message from the WebProcess. It should be killed, or something.

I'm not sure this FIXME is necessary.  We are already doing an early return, which is what we should do in this case.
Comment 4 Brady Eidson 2016-02-18 10:57:44 PST
(In reply to comment #3)
> Comment on attachment 271670 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=271670&action=review
> 
> > Source/WebCore/Modules/indexeddb/server/IDBServer.h:51
> > +class IDBBackingStore;
> 
> This doesn't seem necessary.

It was at one time, I'll go double check now.

> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:217
> > +    if (overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::NoOverwrite) &&
> > +        overwriteMode != static_cast<unsigned>(IndexedDB::ObjectStoreOverwriteMode::Overwrite) &&
> 
> Style bot doesn't like the &&

Yah, stupid style bot.

> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:219
> > +        // FIXME: Corrupt message from the WebProcess. It should be killed, or something.
> 
> I'm not sure this FIXME is necessary.  We are already doing an early return,
> which is what we should do in this case.

I need to reword the FIXME - That was my own placeholder to do so later.

But it still stands, I think.
Comment 5 Brady Eidson 2016-02-18 11:08:05 PST
Created attachment 271674 [details]
Patch for landing v5
Comment 6 WebKit Commit Bot 2016-02-18 12:23:50 PST
Comment on attachment 271674 [details]
Patch for landing v5

Clearing flags on attachment: 271674

Committed r196771: <http://trac.webkit.org/changeset/196771>