Build fix.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2013 23:46:58 +0000 (23:46 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2013 23:46:58 +0000 (23:46 +0000)
        * Modules/webdatabase/DatabaseBackend.cpp: (DoneCreatingDatabaseOnExitCaller):
        Don't fail because of an unused member variable in cross-plaform code path.

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/DatabaseBackend.cpp

index b572987..e5c5a07 100644 (file)
@@ -1,3 +1,10 @@
+2013-02-01  Alexey Proskuryakov  <ap@apple.com>
+
+        Build fix.
+
+        * Modules/webdatabase/DatabaseBackend.cpp: (DoneCreatingDatabaseOnExitCaller):
+        Don't fail because of an unused member variable in cross-plaform code path.
+
 2013-02-01  Kevin Ellis  <kevers@chromium.org>
 
         [chromium] Fat scrollbars on Windows in high-DPI mode.
index ef5bb64..339913d 100644 (file)
@@ -287,6 +287,10 @@ public:
     ~DoneCreatingDatabaseOnExitCaller()
     {
 #if !PLATFORM(CHROMIUM)
+        // m_ec is not used in cross-platform code path. We don't have a macro for unused member variables,
+        // so just using UNUSED_PARAM.
+        // FIXME: Refactor the code to avoid the need for such wildly different behaviors.
+        UNUSED_PARAM(m_ec);
         DatabaseTracker::tracker().doneCreatingDatabase(m_database);
 #else
         if (m_ec == INVALID_STATE_ERR)
@@ -296,7 +300,7 @@ public:
     }
 private:
     DatabaseBackend* m_database;
-    ExceptionCode& m_ec;
+    ExceptionCode& m_ec; // This is a reference to a local variable in performOpenAndVerify(), so appropriate action could be taken based on its value at function exit time.
 };
 
 bool DatabaseBackend::performOpenAndVerify(bool shouldSetVersionInNewDatabase, ExceptionCode& ec, String& errorMessage)