Title: [245232] branches/safari-608.1.24-branch/Source/WebCore
Revision
245232
Author
[email protected]
Date
2019-05-12 23:51:25 -0700 (Sun, 12 May 2019)

Log Message

Cherry-pick r245197. rdar://problem/50628434

    Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
    https://bugs.webkit.org/show_bug.cgi?id=197760

    Reviewed by Jer Noble.

    We have all the data we need, and this crash is happening more than
    expected.

    * platform/sql/SQLiteDatabase.cpp:
    (WebCore::SQLiteDatabase::open):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245197 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608.1.24-branch/Source/WebCore/ChangeLog (245231 => 245232)


--- branches/safari-608.1.24-branch/Source/WebCore/ChangeLog	2019-05-13 06:51:22 UTC (rev 245231)
+++ branches/safari-608.1.24-branch/Source/WebCore/ChangeLog	2019-05-13 06:51:25 UTC (rev 245232)
@@ -1,5 +1,36 @@
 2019-05-12  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r245197. rdar://problem/50628434
+
+    Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
+    https://bugs.webkit.org/show_bug.cgi?id=197760
+    
+    Reviewed by Jer Noble.
+    
+    We have all the data we need, and this crash is happening more than
+    expected.
+    
+    * platform/sql/SQLiteDatabase.cpp:
+    (WebCore::SQLiteDatabase::open):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-05-09  Geoffrey Garen  <[email protected]>
+
+            Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
+            https://bugs.webkit.org/show_bug.cgi?id=197760
+
+            Reviewed by Jer Noble.
+
+            We have all the data we need, and this crash is happening more than
+            expected.
+
+            * platform/sql/SQLiteDatabase.cpp:
+            (WebCore::SQLiteDatabase::open):
+
+2019-05-12  Babak Shafiei  <[email protected]>
+
         Cherry-pick r245191. rdar://problem/48027412
 
     [iOS] baidu.com: Synthetic bold renders too far apart, appears doubled.

Modified: branches/safari-608.1.24-branch/Source/WebCore/platform/sql/SQLiteDatabase.cpp (245231 => 245232)


--- branches/safari-608.1.24-branch/Source/WebCore/platform/sql/SQLiteDatabase.cpp	2019-05-13 06:51:22 UTC (rev 245231)
+++ branches/safari-608.1.24-branch/Source/WebCore/platform/sql/SQLiteDatabase.cpp	2019-05-13 06:51:25 UTC (rev 245232)
@@ -150,8 +150,11 @@
         useWALJournalMode();
 
     String shmFileName = makeString(filename, "-shm"_s);
-    if (FileSystem::fileExists(shmFileName))
-        RELEASE_ASSERT(FileSystem::isSafeToUseMemoryMapForPath(shmFileName));
+    if (FileSystem::fileExists(shmFileName)) {
+        if (!FileSystem::isSafeToUseMemoryMapForPath(shmFileName))
+            RELEASE_LOG_FAULT(SQLDatabase, "Opened an SQLite database with a Class A -shm file. This may trigger a crash when the user locks the device. (%s)", shmFileName.latin1().data());
+            FileSystem::makeSafeToUseMemoryMapForPath(shmFileName);
+    }
 
     return isOpen();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to