[WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 20:49:40 +0000 (20:49 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 20:49:40 +0000 (20:49 +0000)
commitbe74666e923c95d787556219405054b82fb8848c
treec6d8236b14f6cba79c68d2506784f261318019fa
parent20f8c8cd1b386073a6327b816fb95f9c205394c4
[WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
https://bugs.webkit.org/show_bug.cgi?id=143451
<rdar://problem/20437994>

Reviewed by Anders Carlsson.

Initialize WebProcess::m_webSQLiteDatabaseTracker and
NetworkProcess::m_webSQLiteDatabaseTracker in their respective class
constructors instead of doing it later in the initializeWebProcess() /
initializeNetworkProcess() methods.

If we do it later, it can happen that the tracker gets set after
a SQLiteTransactionInProgressAutoCounter initialization and before
the actual transaction. When this happens, the
SQLiteTransactionInProgressAutoCounter variable fails to increment the
transaction count. Then when the transaction is executed,
SQLiteDatabaseTracker::hasTransactionInProgress() can return false.
This would lead to possible assertions on start up on iOS.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h