Title: [243957] trunk/Source
- Revision
- 243957
- Author
- [email protected]
- Date
- 2019-04-05 18:02:44 -0700 (Fri, 05 Apr 2019)
Log Message
[iOS] Web process gets suspended while holding locked database files
https://bugs.webkit.org/show_bug.cgi?id=196519
<rdar://problem/49531797>
Reviewed by Chris Dumez.
Source/WebCore:
Don't use DatabaseTracker singleton before it is initialized.
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::isInitialized):
* Modules/webdatabase/DatabaseTracker.h:
Source/WebKit:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (243956 => 243957)
--- trunk/Source/WebCore/ChangeLog 2019-04-06 00:10:15 UTC (rev 243956)
+++ trunk/Source/WebCore/ChangeLog 2019-04-06 01:02:44 UTC (rev 243957)
@@ -1,3 +1,17 @@
+2019-04-05 Sihui Liu <[email protected]>
+
+ [iOS] Web process gets suspended while holding locked database files
+ https://bugs.webkit.org/show_bug.cgi?id=196519
+ <rdar://problem/49531797>
+
+ Reviewed by Chris Dumez.
+
+ Don't use DatabaseTracker singleton before it is initialized.
+
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::isInitialized):
+ * Modules/webdatabase/DatabaseTracker.h:
+
2019-04-05 Ryosuke Niwa <[email protected]>
Make WeakPtr<Element> possible and deploy it in form associated elements code
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (243956 => 243957)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2019-04-06 00:10:15 UTC (rev 243956)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2019-04-06 01:02:44 UTC (rev 243957)
@@ -80,6 +80,11 @@
staticTracker = new DatabaseTracker(databasePath);
}
+bool DatabaseTracker::isInitialized()
+{
+ return !!staticTracker;
+}
+
DatabaseTracker& DatabaseTracker::singleton()
{
if (!staticTracker)
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h (243956 => 243957)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h 2019-04-06 00:10:15 UTC (rev 243956)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h 2019-04-06 01:02:44 UTC (rev 243957)
@@ -59,6 +59,7 @@
static void initializeTracker(const String& databasePath);
WEBCORE_EXPORT static DatabaseTracker& singleton();
+ WEBCORE_EXPORT static bool isInitialized();
// This singleton will potentially be used from multiple worker threads and the page's context thread simultaneously. To keep this safe, it's
// currently using 4 locks. In order to avoid deadlock when taking multiple locks, you must take them in the correct order:
// m_databaseGuard before quotaManager if both locks are needed.
Modified: trunk/Source/WebKit/ChangeLog (243956 => 243957)
--- trunk/Source/WebKit/ChangeLog 2019-04-06 00:10:15 UTC (rev 243956)
+++ trunk/Source/WebKit/ChangeLog 2019-04-06 01:02:44 UTC (rev 243957)
@@ -1,3 +1,14 @@
+2019-04-05 Sihui Liu <[email protected]>
+
+ [iOS] Web process gets suspended while holding locked database files
+ https://bugs.webkit.org/show_bug.cgi?id=196519
+ <rdar://problem/49531797>
+
+ Reviewed by Chris Dumez.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::actualPrepareToSuspend):
+
2019-04-05 Alex Christensen <[email protected]>
Clicking "Go Back" from a safe browsing warning from an iframe should navigate the WKWebView back to the previous page
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (243956 => 243957)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-04-06 00:10:15 UTC (rev 243956)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-04-06 01:02:44 UTC (rev 243957)
@@ -1467,7 +1467,8 @@
#if PLATFORM(IOS_FAMILY)
m_webSQLiteDatabaseTracker = nullptr;
SQLiteDatabase::setIsDatabaseOpeningForbidden(true);
- DatabaseTracker::singleton().closeAllDatabases(CurrentQueryBehavior::Interrupt);
+ if (DatabaseTracker::isInitialized())
+ DatabaseTracker::singleton().closeAllDatabases(CurrentQueryBehavior::Interrupt);
accessibilityProcessSuspendedNotification(true);
updateFreezerStatus();
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes