Title: [202698] trunk/Source/WebCore
Revision
202698
Author
ryanhad...@apple.com
Date
2016-06-30 13:44:42 -0700 (Thu, 30 Jun 2016)

Log Message

Unreviewed, rolling out r202676.
https://bugs.webkit.org/show_bug.cgi?id=159314

This change caused storage/websql tests to crash on Mac and
iOS WK1 (Requested by ryanhaddad on #webkit).

Reverted changeset:

"Purge PassRefPtr in Modules/webdatabase"
https://bugs.webkit.org/show_bug.cgi?id=159255
http://trac.webkit.org/changeset/202676

Patch by Commit Queue <commit-qu...@webkit.org> on 2016-06-30

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202697 => 202698)


--- trunk/Source/WebCore/ChangeLog	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/ChangeLog	2016-06-30 20:44:42 UTC (rev 202698)
@@ -1,3 +1,17 @@
+2016-06-30  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r202676.
+        https://bugs.webkit.org/show_bug.cgi?id=159314
+
+        This change caused storage/websql tests to crash on Mac and
+        iOS WK1 (Requested by ryanhaddad on #webkit).
+
+        Reverted changeset:
+
+        "Purge PassRefPtr in Modules/webdatabase"
+        https://bugs.webkit.org/show_bug.cgi?id=159255
+        http://trac.webkit.org/changeset/202676
+
 2016-06-30  Antoine Quint  <grao...@apple.com>
 
         [iOS] Media controls are too cramped with small video

Modified: trunk/Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -30,6 +30,7 @@
 
 #include "Database.h"
 #include "SQLError.h"
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {

Modified: trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -21,7 +21,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
 #ifndef DOMWindowWebDatabase_h
@@ -28,6 +28,7 @@
 #define DOMWindowWebDatabase_h
 
 #include "ExceptionCode.h"
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 #include <wtf/text/WTFString.h>

Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -54,6 +54,7 @@
 #include "SecurityOrigin.h"
 #include "VoidCallback.h"
 #include <wtf/NeverDestroyed.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
@@ -202,9 +203,9 @@
     return guid;
 }
 
-Database::Database(RefPtr<DatabaseContext>&& databaseContext, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize)
+Database::Database(PassRefPtr<DatabaseContext> databaseContext, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize)
     : m_scriptExecutionContext(databaseContext->scriptExecutionContext())
-    , m_databaseContext(WTFMove(databaseContext))
+    , m_databaseContext(databaseContext)
     , m_deleted(false)
     , m_name(name.isolatedCopy())
     , m_expectedVersion(expectedVersion.isolatedCopy())
@@ -241,13 +242,12 @@
 
 Database::~Database()
 {
-    // The reference to the ScriptExecutionContext needs to be cleared on the _javascript_ thread.
-    // If we're on that thread already, we can just let the RefPtr's destruction do the dereffing.
+    // The reference to the ScriptExecutionContext needs to be cleared on the _javascript_ thread.  If we're on that thread already, we can just let the RefPtr's destruction do the dereffing.
     if (!m_scriptExecutionContext->isContextThread()) {
         // Grab a pointer to the script execution here because we're releasing it when we pass it to
         // DerefContextTask::create.
-        RefPtr<ScriptExecutionContext> passedContext;
-        passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext = WTFMove(m_scriptExecutionContext)] (ScriptExecutionContext& context) {
+        PassRefPtr<ScriptExecutionContext> passedContext = m_scriptExecutionContext.release();
+        passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext] (ScriptExecutionContext& context) {
             ASSERT_UNUSED(context, &context == passedContext);
             RefPtr<ScriptExecutionContext> scriptExecutionContext(passedContext);
         }});
@@ -571,7 +571,7 @@
         transaction = m_transactionQueue.takeFirst();
 
     if (transaction && databaseContext()->databaseThread()) {
-        auto task = std::make_unique<DatabaseTransactionTask>(WTFMove(transaction));
+        auto task = std::make_unique<DatabaseTransactionTask>(transaction);
         LOG(StorageAPI, "Scheduling DatabaseTransactionTask %p for transaction %p\n", task.get(), task->transaction());
         m_transactionInProgress = true;
         databaseContext()->databaseThread()->scheduleTask(WTFMove(task));
@@ -589,7 +589,7 @@
     if (data)
         wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVersion());
 
-    RefPtr<SQLTransactionBackend> transactionBackend = SQLTransactionBackend::create(this, WTFMove(transaction), WTFMove(wrapper), readOnly);
+    RefPtr<SQLTransactionBackend> transactionBackend = SQLTransactionBackend::create(this, WTFMove(transaction), wrapper, readOnly);
     m_transactionQueue.append(transactionBackend);
     if (!m_transactionInProgress)
         scheduleTransaction();

Modified: trunk/Source/WebCore/Modules/webdatabase/Database.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/Database.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -125,7 +125,7 @@
     void performClose();
 
 private:
-    Database(RefPtr<DatabaseContext>&&, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize);
+    Database(PassRefPtr<DatabaseContext>, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize);
 
     void closeDatabase();
 

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseAuthorizer.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseAuthorizer.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseAuthorizer.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -29,6 +29,7 @@
 #include "config.h"
 #include "DatabaseAuthorizer.h"
 
+#include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -343,7 +344,7 @@
 {
     if (m_permissions & NoAccessMask && m_securityEnabled)
         return SQLAuthDeny;
-
+    
     return denyBasedOnTableName(tableName);
 }
 

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
 #include "config.h"
@@ -272,7 +272,7 @@
 
 RefPtr<Database> DatabaseManager::openDatabase(ScriptExecutionContext* context,
     const String& name, const String& expectedVersion, const String& displayName,
-    unsigned long estimatedSize, RefPtr<DatabaseCallback>&& creationCallback,
+    unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback,
     DatabaseError& error)
 {
     ScriptController::initializeThreading();
@@ -327,7 +327,7 @@
                 return String();
         }
     }
-
+    
     return m_server->fullPathForDatabase(origin, name, createIfDoesNotExist);
 }
 
@@ -350,16 +350,16 @@
 {
     {
         std::lock_guard<Lock> lock(m_mutex);
-
+        
         for (auto* proposedDatabase : m_proposedDatabases) {
             if (proposedDatabase->details().name() == name && proposedDatabase->origin()->equal(origin)) {
                 ASSERT(proposedDatabase->details().threadID() == std::this_thread::get_id() || isMainThread());
-
+                
                 return proposedDatabase->details();
             }
         }
     }
-
+    
     return m_server->detailsForNameAndOrigin(name, origin);
 }
 

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
 #ifndef DatabaseManager_h
@@ -33,6 +33,7 @@
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/Lock.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/Threading.h>
 
 namespace WebCore {
@@ -80,7 +81,7 @@
 
     static ExceptionCode exceptionCodeForDatabaseError(DatabaseError);
 
-    RefPtr<Database> openDatabase(ScriptExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, RefPtr<DatabaseCallback>&&, DatabaseError&);
+    RefPtr<Database> openDatabase(ScriptExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback>, DatabaseError&);
 
     WEBCORE_EXPORT bool hasOpenDatabases(ScriptExecutionContext*);
 

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
 #include "config.h"
@@ -117,7 +117,7 @@
 {
     RefPtr<Database> database;
     bool success = false; // Make some older compilers happy.
-
+    
     switch (attempt) {
     case FirstTryToOpenDatabase:
         success = DatabaseTracker::tracker().canEstablishDatabase(backendContext.get(), name, estimatedSize, error);
@@ -133,7 +133,7 @@
 
 RefPtr<Database> DatabaseServer::createDatabase(RefPtr<DatabaseContext>& backendContext, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, bool setVersionInNewDatabase, DatabaseError& error, String& errorMessage)
 {
-    RefPtr<Database> database = adoptRef(new Database(backendContext.copyRef(), name, expectedVersion, displayName, estimatedSize));
+    RefPtr<Database> database = adoptRef(new Database(backendContext, name, expectedVersion, displayName, estimatedSize));
 
     if (!database->openAndVerifyVersion(setVersionInNewDatabase, error, errorMessage))
         return nullptr;

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -144,9 +144,9 @@
 // *** DatabaseTransactionTask ***
 // Starts a transaction that will report its results via a callback.
 
-DatabaseTransactionTask::DatabaseTransactionTask(RefPtr<SQLTransactionBackend>&& transaction)
+DatabaseTransactionTask::DatabaseTransactionTask(PassRefPtr<SQLTransactionBackend> transaction)
     : DatabaseTask(*transaction->database(), 0)
-    , m_transaction(WTFMove(transaction))
+    , m_transaction(transaction)
     , m_didPerformTask(false)
 {
 }

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -33,6 +33,7 @@
 #include "SQLTransactionBackend.h"
 #include <wtf/Condition.h>
 #include <wtf/Lock.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
@@ -122,7 +123,7 @@
 
 class DatabaseTransactionTask : public DatabaseTask {
 public:
-    explicit DatabaseTransactionTask(RefPtr<SQLTransactionBackend>&&);
+    explicit DatabaseTransactionTask(PassRefPtr<SQLTransactionBackend>);
     virtual ~DatabaseTransactionTask();
 
     SQLTransactionBackend* transaction() const { return m_transaction.get(); }

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -41,8 +41,8 @@
 // - by unwrapping and then dereferencing normally - on context thread only
 template<typename T> class SQLCallbackWrapper {
 public:
-    SQLCallbackWrapper(RefPtr<T>&& callback, ScriptExecutionContext* scriptExecutionContext)
-        : m_callback(WTFMove(callback))
+    SQLCallbackWrapper(PassRefPtr<T> callback, ScriptExecutionContext* scriptExecutionContext)
+        : m_callback(callback)
         , m_scriptExecutionContext(m_callback ? scriptExecutionContext : 0)
     {
         ASSERT(!m_callback || (m_scriptExecutionContext.get() && m_scriptExecutionContext->isContextThread()));

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -29,6 +29,7 @@
 #ifndef SQLResultSetRowList_h
 #define SQLResultSetRowList_h
 
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include "SQLValue.h"
 

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLStatement.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLStatement.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLStatement.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -40,7 +40,7 @@
 #include <wtf/text/CString.h>
 
 
-// The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive?
+// The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive? 
 // ==========================================================================
 // The RefPtr chain goes something like this:
 //
@@ -74,11 +74,11 @@
 
 namespace WebCore {
 
-SQLStatement::SQLStatement(Database& database, const String& statement, const Vector<SQLValue>& arguments, RefPtr<SQLStatementCallback>&& callback, RefPtr<SQLStatementErrorCallback>&& errorCallback, int permissions)
+SQLStatement::SQLStatement(Database& database, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback, int permissions)
     : m_statement(statement.isolatedCopy())
     , m_arguments(arguments)
-    , m_statementCallbackWrapper(WTFMove(callback), database.scriptExecutionContext())
-    , m_statementErrorCallbackWrapper(WTFMove(errorCallback), database.scriptExecutionContext())
+    , m_statementCallbackWrapper(callback, database.scriptExecutionContext())
+    , m_statementErrorCallbackWrapper(errorCallback, database.scriptExecutionContext())
     , m_permissions(permissions)
 {
 }
@@ -87,14 +87,14 @@
 {
 }
 
-SQLError* SQLStatement::sqlError() const
+PassRefPtr<SQLError> SQLStatement::sqlError() const
 {
-    return m_error.get();
+    return m_error;
 }
 
-SQLResultSet* SQLStatement::sqlResultSet() const
+PassRefPtr<SQLResultSet> SQLStatement::sqlResultSet() const
 {
-    return m_resultSet.get();
+    return m_resultSet;
 }
 
 bool SQLStatement::execute(Database& db)

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLStatement.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLStatement.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLStatement.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -45,7 +45,7 @@
 
 class SQLStatement {
 public:
-    SQLStatement(Database&, const String&, const Vector<SQLValue>&, RefPtr<SQLStatementCallback>&&, RefPtr<SQLStatementErrorCallback>&&, int permissions);
+    SQLStatement(Database&, const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
     ~SQLStatement();
 
     bool execute(Database&);
@@ -58,8 +58,8 @@
     void setDatabaseDeletedError();
     void setVersionMismatchedError();
 
-    SQLError* sqlError() const;
-    SQLResultSet* sqlResultSet() const;
+    PassRefPtr<SQLError> sqlError() const;
+    PassRefPtr<SQLResultSet> sqlResultSet() const;
 
 private:
     void setFailureDueToQuota();

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransaction.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLTransaction.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransaction.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -32,6 +32,7 @@
 #include "EventTarget.h"
 #include "SQLCallbackWrapper.h"
 #include "SQLTransactionStateMachine.h"
+#include <wtf/PassRefPtr.h>
 #include <wtf/Ref.h>
 #include <wtf/RefPtr.h>
 

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp	2016-06-30 20:44:42 UTC (rev 202698)
@@ -230,7 +230,7 @@
 // to wait for further action.
 
 
-// The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransaction alive?
+// The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransaction alive? 
 // ==============================================================================
 // The RefPtr chain goes something like this:
 //
@@ -307,7 +307,7 @@
 //     - DatabaseBackend::close() will iterate
 //       DatabaseBackend::m_transactionQueue and call
 //       notifyDatabaseThreadIsShuttingDown() on each transaction there.
-//
+//        
 //     Phase 2. After scheduling, before state AcquireLock
 //
 //     - If the interruption occures before the DatabaseTransactionTask is
@@ -343,15 +343,15 @@
 
 namespace WebCore {
 
-Ref<SQLTransactionBackend> SQLTransactionBackend::create(Database* db, RefPtr<SQLTransaction>&& frontend, RefPtr<SQLTransactionWrapper>&& wrapper, bool readOnly)
+Ref<SQLTransactionBackend> SQLTransactionBackend::create(Database* db, PassRefPtr<SQLTransaction> frontend, PassRefPtr<SQLTransactionWrapper> wrapper, bool readOnly)
 {
-    return adoptRef(*new SQLTransactionBackend(db, WTFMove(frontend), WTFMove(wrapper), readOnly));
+    return adoptRef(*new SQLTransactionBackend(db, frontend, wrapper, readOnly));
 }
 
-SQLTransactionBackend::SQLTransactionBackend(Database* db, RefPtr<SQLTransaction>&& frontend, RefPtr<SQLTransactionWrapper>&& wrapper, bool readOnly)
-    : m_frontend(WTFMove(frontend))
+SQLTransactionBackend::SQLTransactionBackend(Database* db, PassRefPtr<SQLTransaction> frontend, PassRefPtr<SQLTransactionWrapper> wrapper, bool readOnly)
+    : m_frontend(frontend)
     , m_database(db)
-    , m_wrapper(WTFMove(wrapper))
+    , m_wrapper(wrapper)
     , m_hasCallback(m_frontend->hasCallback())
     , m_hasSuccessCallback(m_frontend->hasSuccessCallback())
     , m_hasErrorCallback(m_frontend->hasErrorCallback())
@@ -428,9 +428,9 @@
     return m_currentStatementBackend.get();
 }
 
-SQLError* SQLTransactionBackend::transactionError()
+PassRefPtr<SQLError> SQLTransactionBackend::transactionError()
 {
-    return m_transactionError.get();
+    return m_transactionError;
 }
 
 void SQLTransactionBackend::setShouldRetryCurrentStatement(bool shouldRetry)

Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h (202697 => 202698)


--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h	2016-06-30 20:29:26 UTC (rev 202697)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h	2016-06-30 20:44:42 UTC (rev 202698)
@@ -58,7 +58,7 @@
 
 class SQLTransactionBackend : public ThreadSafeRefCounted<SQLTransactionBackend>, public SQLTransactionStateMachine<SQLTransactionBackend> {
 public:
-    static Ref<SQLTransactionBackend> create(Database*, RefPtr<SQLTransaction>&&, RefPtr<SQLTransactionWrapper>&&, bool readOnly);
+    static Ref<SQLTransactionBackend> create(Database*, PassRefPtr<SQLTransaction>, PassRefPtr<SQLTransactionWrapper>, bool readOnly);
 
     virtual ~SQLTransactionBackend();
 
@@ -71,13 +71,13 @@
 
     // APIs called from the frontend published via SQLTransactionBackend:
     void requestTransitToState(SQLTransactionState);
-    SQLError* transactionError();
+    PassRefPtr<SQLError> transactionError();
     SQLStatement* currentStatement();
     void setShouldRetryCurrentStatement(bool);
     void executeSQL(std::unique_ptr<SQLStatement>);
-
+    
 private:
-    SQLTransactionBackend(Database*, RefPtr<SQLTransaction>&&, RefPtr<SQLTransactionWrapper>&&, bool readOnly);
+    SQLTransactionBackend(Database*, PassRefPtr<SQLTransaction>, PassRefPtr<SQLTransactionWrapper>, bool readOnly);
 
     void doCleanup();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to