Log the error message when failing to open the database
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 18:48:32 +0000 (18:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 18:48:32 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182795
<rdar://problem/37592399>

Unreviewed.
Fixing iOS simulator debug build.

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-16

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):

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

Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/RegistrationDatabase.cpp

index 759bd59..975e7d9 100644 (file)
@@ -1,3 +1,15 @@
+2018-02-16  Youenn Fablet  <youenn@apple.com>
+
+        Log the error message when failing to open the database
+        https://bugs.webkit.org/show_bug.cgi?id=182795
+        <rdar://problem/37592399>
+
+        Unreviewed.
+        Fixing iOS simulator debug build.
+
+        * workers/service/server/RegistrationDatabase.cpp:
+        (WebCore::RegistrationDatabase::openSQLiteDatabase):
+
 2018-02-16  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         IndexedDB: Several test crash in when destroying a IDBKeyData
index 0320ddd..051cada 100644 (file)
@@ -108,7 +108,13 @@ void RegistrationDatabase::openSQLiteDatabase(const String& fullFilename)
     String errorMessage;
     auto scopeExit = makeScopeExit([&, errorMessage = &errorMessage] {
         ASSERT_UNUSED(errorMessage, !errorMessage->isNull());
+
+#if RELEASE_LOG_DISABLED
+        LOG_ERROR(ServiceWorker, "Failed to open Service Worker registration database: %s", errorMessage->utf8().data());
+#else
         RELEASE_LOG_ERROR(ServiceWorker, "Failed to open Service Worker registration database: %{public}s", errorMessage->utf8().data());
+#endif
+
         m_database = nullptr;
         postTaskReply(createCrossThreadTask(*this, &RegistrationDatabase::databaseFailedToOpen));
     });