Bug 156916 - Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy
Summary: Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer a...
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 149953
  Show dependency treegraph
 
Reported: 2016-04-22 10:18 PDT by Brady Eidson
Modified: 2016-04-22 11:06 PDT (History)
6 users (show)

See Also:


Attachments
Patch v1 (8.46 KB, patch)
2016-04-22 10:20 PDT, Brady Eidson
thorton: review+
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-22 10:18:05 PDT
Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy

The ConnectionToServer should own its own ConnectionProxy, and ref()'ing the proxy should simply ref() the connection itself.
Comment 1 Brady Eidson 2016-04-22 10:20:56 PDT
Created attachment 277070 [details]
Patch v1
Comment 2 Tim Horton 2016-04-22 10:28:46 PDT
Comment on attachment 277070 [details]
Patch v1

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

> Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp:51
> +    m_proxy = std::make_unique<IDBConnectionProxy>(*this);

Can't you do this in the initializer list? I feel like e.g. WebPageProxy does.
Comment 3 Brady Eidson 2016-04-22 10:29:45 PDT
(In reply to comment #2)
> Comment on attachment 277070 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277070&action=review
> 
> > Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp:51
> > +    m_proxy = std::make_unique<IDBConnectionProxy>(*this);
> 
> Can't you do this in the initializer list? I feel like e.g. WebPageProxy
> does.

Yah.
Comment 4 Brady Eidson 2016-04-22 11:04:41 PDT
Build breakage was due to missing an exported header from WebCore.

Fixed.

Also, had to reorder one clause in WK2 to make the identifier available at the time the connection is created.
Comment 5 Brady Eidson 2016-04-22 11:06:10 PDT
http://trac.webkit.org/changeset/199882