Modern IDB: WebKit 2 IPC layer easily confused about multiple web processes being connected Can result in weird behavior, including (most obviously) ASSERTs in debug builds. <rdar://problem/24857351>
Created attachment 272518 [details] Patch v1
Comment on attachment 272518 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=272518&action=review > Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp:99 > +static uint64_t generateConnectionToServerIdentifier() It makes sense to have this in the DatabaseProcess. Do we have any protection against invalid identifiers being used if the DatabaseProcess crashes? > Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:62 > + m_isOpenInServer = sendSync(Messages::DatabaseToWebProcessConnection::EstablishIDBConnectionToServer(), m_identifier); Why can't we send asynchronously?
(In reply to comment #2) > Comment on attachment 272518 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272518&action=review > > > Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp:99 > > +static uint64_t generateConnectionToServerIdentifier() > > It makes sense to have this in the DatabaseProcess. Do we have any > protection against invalid identifiers being used if the DatabaseProcess > crashes? DatabaseProcess goes away, all related objects in the web process are invalidated. > > Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:62 > > + m_isOpenInServer = sendSync(Messages::DatabaseToWebProcessConnection::EstablishIDBConnectionToServer(), m_identifier); > > Why can't we send asynchronously? New connections can start queuing up operations in the WebProcess via javascript immediately. This is at most one sync message per tab without any complicated/long-running work behind it. NBD.
Comment on attachment 272518 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=272518&action=review >>> Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp:99 >>> +static uint64_t generateConnectionToServerIdentifier() >> >> It makes sense to have this in the DatabaseProcess. Do we have any protection against invalid identifiers being used if the DatabaseProcess crashes? > > DatabaseProcess goes away, all related objects in the web process are invalidated. It makes sense to have this in the DatabaseProcess. Do we have any protection against invalid identifiers being used if the DatabaseProcess crashes? >>> Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:62 >>> + m_isOpenInServer = sendSync(Messages::DatabaseToWebProcessConnection::EstablishIDBConnectionToServer(), m_identifier); >> >> Why can't we send asynchronously? > > New connections can start queuing up operations in the WebProcess via javascript immediately. > > This is at most one sync message per tab without any complicated/long-running work behind it. NBD. Why can't we send asynchronously?
http://trac.webkit.org/changeset/197372