Description[IndexedDB] Closing mojo connections when renderer exits.
Changes IndexedDBDispatcherHost to be owned by a unique_ptr instead of
ref counted, and makes the mojo connections for the database and the
cursor interfaces strongly stored (owned) by the dispatcher host.
The dispatcher host now supports weak pointers, which are used by the
IndexedDB.*Callbacks (still refcounted, and probably by necessity) to
ignore responses when the host is gone. The host also observes renderer
exit - which can happen well before the render process host is
destroyed - to destruct the bindings and clear the weak pointers.
Finally, minor cleanup includes minimizing dependencies, adding the
connection error listener on IndexedDBDatabaseCallbacks to cut that off
as early as possible, and formally create the IDBHelper on the
dispatcher host to make the idb thread separation cleaner.
BUG=696055
Review-Url: https://codereview.chromium.org/2727733004
Cr-Commit-Position: refs/heads/master@{#463786}
Committed: https://chromium.googlesource.com/chromium/src/+/1f18ca937688b4e0ee570b4d506f5ac21ead5b93
Patch Set 1 #
Total comments: 10
Patch Set 2 : comments, still figuring out how to test #
Total comments: 8
Patch Set 3 : RefPtr refactor, IDBHelper in DispatcherHost, explicit exit handling #Patch Set 4 : added connection error listener #Patch Set 5 : Cleaned up logging #
Total comments: 2
Patch Set 6 : Removed raw pointer from IndexedDBCallbacks, Impl creation now on IO thread #Patch Set 7 : No more raw pointers where we're not guarenteed lifetime #
Total comments: 8
Patch Set 8 : tests running #
Total comments: 11
Patch Set 9 : comments #Patch Set 10 : fixed browsertest race condition #Patch Set 11 : rebase #Patch Set 12 : fix and rebase #
Total comments: 16
Patch Set 13 : comments #Messages
Total messages: 62 (36 generated)
|