WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for landing
bug-127278-20140203065938.patch (text/plain), 23.54 KB, created by
Zan Dobersek
on 2014-02-03 06:59:43 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2014-02-03 06:59:43 PST
Size:
23.54 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 163308) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,45 @@ >+2014-02-03 Zan Dobersek <zdobersek@igalia.com> >+ >+ Move the webdatabase module source code to std::unique_ptr >+ https://bugs.webkit.org/show_bug.cgi?id=127278 >+ >+ Reviewed by Antti Koivisto. >+ >+ Replace the majority of OwnPtr uses in the webdatabase module with std::unique_ptr. >+ The only remaining uses are due to ScriptExecutionContext::Task subclasses. >+ >+ * Modules/webdatabase/AbstractSQLTransactionBackend.h: >+ * Modules/webdatabase/Database.cpp: >+ * Modules/webdatabase/DatabaseTask.h: >+ * Modules/webdatabase/DatabaseThread.cpp: >+ (WebCore::DatabaseThread::DatabaseThread): >+ * Modules/webdatabase/DatabaseThread.h: >+ * Modules/webdatabase/DatabaseTracker.cpp: >+ (WebCore::DatabaseTracker::addOpenDatabase): >+ * Modules/webdatabase/DatabaseTracker.h: >+ * Modules/webdatabase/OriginLock.cpp: >+ * Modules/webdatabase/SQLStatement.cpp: >+ * Modules/webdatabase/SQLStatement.h: >+ * Modules/webdatabase/SQLStatementBackend.cpp: >+ (WebCore::SQLStatementBackend::create): >+ (WebCore::SQLStatementBackend::SQLStatementBackend): >+ * Modules/webdatabase/SQLStatementBackend.h: >+ * Modules/webdatabase/SQLTransaction.cpp: >+ (WebCore::SQLTransaction::executeSQL): >+ * Modules/webdatabase/SQLTransactionBackend.cpp: >+ (WebCore::SQLTransactionBackend::doCleanup): >+ (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded): >+ (WebCore::SQLTransactionBackend::executeSQL): >+ (WebCore::SQLTransactionBackend::openTransactionAndPreflight): >+ (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback): >+ * Modules/webdatabase/SQLTransactionBackend.h: >+ * Modules/webdatabase/SQLTransactionBackendSync.cpp: >+ (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync): >+ (WebCore::SQLTransactionBackendSync::begin): >+ (WebCore::SQLTransactionBackendSync::commit): >+ (WebCore::SQLTransactionBackendSync::rollback): >+ * Modules/webdatabase/SQLTransactionBackendSync.h: >+ > 2014-02-03 Mihai Maerean <mmaerean@adobe.com> > > [CSS Regions] Fix selection and hover effect of content in region with overflow:hidden >Index: Source/WebCore/Modules/webdatabase/AbstractSQLTransactionBackend.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/AbstractSQLTransactionBackend.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/AbstractSQLTransactionBackend.h (working copy) >@@ -32,7 +32,7 @@ > #include "SQLError.h" > #include "SQLTransactionState.h" > #include "SQLValue.h" >-#include <wtf/PassOwnPtr.h> >+#include <memory> > #include <wtf/ThreadSafeRefCounted.h> > #include <wtf/Vector.h> > #include <wtf/text/WTFString.h> >@@ -49,7 +49,7 @@ public: > virtual AbstractSQLStatement* currentStatement() = 0; > virtual void setShouldRetryCurrentStatement(bool) = 0; > >- virtual void executeSQL(PassOwnPtr<AbstractSQLStatement>, const String& statement, >+ virtual void executeSQL(std::unique_ptr<AbstractSQLStatement>, const String& statement, > const Vector<SQLValue>& arguments, int permissions) = 0; > > }; >Index: Source/WebCore/Modules/webdatabase/Database.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/Database.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/Database.cpp (working copy) >@@ -53,7 +53,6 @@ > #include "ScriptExecutionContext.h" > #include "SecurityOrigin.h" > #include "VoidCallback.h" >-#include <wtf/OwnPtr.h> > #include <wtf/PassOwnPtr.h> > #include <wtf/PassRefPtr.h> > #include <wtf/RefPtr.h> >Index: Source/WebCore/Modules/webdatabase/DatabaseTask.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/DatabaseTask.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/DatabaseTask.h (working copy) >@@ -34,8 +34,6 @@ > #include "DatabaseBasicTypes.h" > #include "DatabaseError.h" > #include "SQLTransactionBackend.h" >-#include <wtf/OwnPtr.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/PassRefPtr.h> > #include <wtf/Threading.h> > #include <wtf/Vector.h> >Index: Source/WebCore/Modules/webdatabase/DatabaseThread.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/DatabaseThread.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/DatabaseThread.cpp (working copy) >@@ -45,8 +45,8 @@ DatabaseThread::DatabaseThread() > #if PLATFORM(IOS) > , m_paused(false) > #endif >- , m_transactionClient(adoptPtr(new SQLTransactionClient())) >- , m_transactionCoordinator(adoptPtr(new SQLTransactionCoordinator())) >+ , m_transactionClient(std::make_unique<SQLTransactionClient>()) >+ , m_transactionCoordinator(std::make_unique<SQLTransactionCoordinator>()) > , m_cleanupSync(0) > { > m_selfRef = this; >Index: Source/WebCore/Modules/webdatabase/DatabaseThread.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/DatabaseThread.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/DatabaseThread.h (working copy) >@@ -30,12 +30,11 @@ > > #if ENABLE(SQL_DATABASE) > >+#include <memory> > #include <wtf/Deque.h> > #include <wtf/HashMap.h> > #include <wtf/HashSet.h> > #include <wtf/MessageQueue.h> >-#include <wtf/OwnPtr.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/PassRefPtr.h> > #include <wtf/RefPtr.h> > #include <wtf/Threading.h> >@@ -95,8 +94,8 @@ private: > typedef HashSet<RefPtr<DatabaseBackend>> DatabaseSet; > DatabaseSet m_openDatabaseSet; > >- OwnPtr<SQLTransactionClient> m_transactionClient; >- OwnPtr<SQLTransactionCoordinator> m_transactionCoordinator; >+ std::unique_ptr<SQLTransactionClient> m_transactionClient; >+ std::unique_ptr<SQLTransactionCoordinator> m_transactionCoordinator; > DatabaseTaskSynchronizer* m_cleanupSync; > }; > >Index: Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (working copy) >@@ -557,7 +557,7 @@ void DatabaseTracker::addOpenDatabase(Da > MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); > > if (!m_openDatabaseMap) >- m_openDatabaseMap = adoptPtr(new DatabaseOriginMap); >+ m_openDatabaseMap = std::make_unique<DatabaseOriginMap>(); > > String name(database->stringIdentifier()); > DatabaseNameMap* nameMap = m_openDatabaseMap->get(database->securityOrigin()); >Index: Source/WebCore/Modules/webdatabase/DatabaseTracker.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/DatabaseTracker.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/DatabaseTracker.h (working copy) >@@ -37,7 +37,6 @@ > #include "SecurityOriginHash.h" > #include <wtf/HashMap.h> > #include <wtf/HashSet.h> >-#include <wtf/OwnPtr.h> > #include <wtf/text/StringHash.h> > #include <wtf/text/WTFString.h> > >@@ -152,7 +151,7 @@ private: > typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap; > > Mutex m_openDatabaseMapGuard; >- mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap; >+ mutable std::unique_ptr<DatabaseOriginMap> m_openDatabaseMap; > > // This lock protects m_database, m_originLockMap, m_databaseDirectoryPath, m_originsBeingDeleted, m_beingCreated, and m_beingDeleted. > Mutex m_databaseGuard; >Index: Source/WebCore/Modules/webdatabase/OriginLock.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/OriginLock.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/OriginLock.cpp (working copy) >@@ -29,7 +29,6 @@ > #if ENABLE(SQL_DATABASE) > > #include "FileSystem.h" >-#include <wtf/PassOwnPtr.h> > > namespace WebCore { > >Index: Source/WebCore/Modules/webdatabase/SQLStatement.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLStatement.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLStatement.cpp (working copy) >@@ -45,12 +45,6 @@ > > namespace WebCore { > >-PassOwnPtr<SQLStatement> SQLStatement::create(Database* database, >- PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback) >-{ >- return adoptPtr(new SQLStatement(database, callback, errorCallback)); >-} >- > SQLStatement::SQLStatement(Database* database, PassRefPtr<SQLStatementCallback> callback, > PassRefPtr<SQLStatementErrorCallback> errorCallback) > : m_statementCallbackWrapper(callback, database->scriptExecutionContext()) >Index: Source/WebCore/Modules/webdatabase/SQLStatement.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLStatement.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLStatement.h (working copy) >@@ -49,8 +49,7 @@ class SQLTransaction; > > class SQLStatement : public AbstractSQLStatement { > public: >- static PassOwnPtr<SQLStatement> create(Database*, >- PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>); >+ SQLStatement(Database*, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>); > > bool performCallback(SQLTransaction*); > >@@ -60,8 +59,6 @@ public: > virtual bool hasErrorCallback(); > > private: >- SQLStatement(Database*, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>); >- > // The AbstractSQLStatementBackend owns the SQLStatement. Hence, the backend is > // guaranteed to be outlive the SQLStatement, and it is safe for us to refer > // to the backend using a raw pointer here. >Index: Source/WebCore/Modules/webdatabase/SQLStatementBackend.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLStatementBackend.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLStatementBackend.cpp (working copy) >@@ -47,13 +47,13 @@ > // At birth (in SQLTransactionBackend::executeSQL()): > // ================================================= > // SQLTransactionBackend // Deque<RefPtr<SQLStatementBackend>> m_statementQueue points to ... >-// --> SQLStatementBackend // OwnPtr<SQLStatement> m_frontend points to ... >+// --> SQLStatementBackend // std::unique_ptr<SQLStatement> m_frontend points to ... > // --> SQLStatement > // > // After grabbing the statement for execution (in SQLTransactionBackend::getNextStatement()): > // ========================================================================================= > // SQLTransactionBackend // RefPtr<SQLStatementBackend> m_currentStatementBackend points to ... >-// --> SQLStatementBackend // OwnPtr<SQLStatement> m_frontend points to ... >+// --> SQLStatementBackend // std::unique_ptr<SQLStatement> m_frontend points to ... > // --> SQLStatement > // > // Then we execute the statement in SQLTransactionBackend::runCurrentStatementAndGetNextState(). >@@ -74,15 +74,15 @@ > > namespace WebCore { > >-PassRefPtr<SQLStatementBackend> SQLStatementBackend::create(PassOwnPtr<AbstractSQLStatement> frontend, >+PassRefPtr<SQLStatementBackend> SQLStatementBackend::create(std::unique_ptr<AbstractSQLStatement> frontend, > const String& statement, const Vector<SQLValue>& arguments, int permissions) > { >- return adoptRef(new SQLStatementBackend(frontend, statement, arguments, permissions)); >+ return adoptRef(new SQLStatementBackend(std::move(frontend), statement, arguments, permissions)); > } > >-SQLStatementBackend::SQLStatementBackend(PassOwnPtr<AbstractSQLStatement> frontend, >+SQLStatementBackend::SQLStatementBackend(std::unique_ptr<AbstractSQLStatement> frontend, > const String& statement, const Vector<SQLValue>& arguments, int permissions) >- : m_frontend(frontend) >+ : m_frontend(std::move(frontend)) > , m_statement(statement.isolatedCopy()) > , m_arguments(arguments) > , m_hasCallback(m_frontend->hasCallback()) >Index: Source/WebCore/Modules/webdatabase/SQLStatementBackend.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLStatementBackend.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLStatementBackend.h (working copy) >@@ -33,7 +33,6 @@ > #include "AbstractSQLStatementBackend.h" > #include "SQLValue.h" > #include <wtf/Forward.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/Vector.h> > #include <wtf/text/WTFString.h> > >@@ -46,7 +45,7 @@ class SQLTransactionBackend; > > class SQLStatementBackend : public AbstractSQLStatementBackend { > public: >- static PassRefPtr<SQLStatementBackend> create(PassOwnPtr<AbstractSQLStatement>, >+ static PassRefPtr<SQLStatementBackend> create(std::unique_ptr<AbstractSQLStatement>, > const String& sqlStatement, const Vector<SQLValue>& arguments, int permissions); > > bool execute(DatabaseBackend*); >@@ -63,13 +62,13 @@ public: > virtual PassRefPtr<SQLResultSet> sqlResultSet() const; > > private: >- SQLStatementBackend(PassOwnPtr<AbstractSQLStatement>, const String& statement, >+ SQLStatementBackend(std::unique_ptr<AbstractSQLStatement>, const String& statement, > const Vector<SQLValue>& arguments, int permissions); > > void setFailureDueToQuota(); > void clearFailureDueToQuota(); > >- OwnPtr<AbstractSQLStatement> m_frontend; >+ std::unique_ptr<AbstractSQLStatement> m_frontend; > String m_statement; > Vector<SQLValue> m_arguments; > bool m_hasCallback; >Index: Source/WebCore/Modules/webdatabase/SQLTransaction.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLTransaction.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLTransaction.cpp (working copy) >@@ -261,8 +261,8 @@ void SQLTransaction::executeSQL(const St > else if (m_readOnly) > permissions |= DatabaseAuthorizer::ReadOnlyMask; > >- OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), callback, callbackError); >- m_backend->executeSQL(statement.release(), sqlStatement, arguments, permissions); >+ auto statement = std::make_unique<SQLStatement>(m_database.get(), callback, callbackError); >+ m_backend->executeSQL(std::move(statement), sqlStatement, arguments, permissions); > } > > bool SQLTransaction::computeNextStateAndCleanupIfNeeded() >Index: Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp (working copy) >@@ -260,7 +260,7 @@ > // > // When executing the transaction (in DatabaseThread::databaseThread()): > // ==================================================================== >-// OwnPtr<DatabaseTask> task; // points to ... >+// std::unique_ptr<DatabaseTask> task; // points to ... > // --> DatabaseTransactionTask // RefPtr<SQLTransactionBackend> m_transaction points to ... > // --> SQLTransactionBackend // RefPtr<SQLTransaction> m_frontend; > // --> SQLTransaction // RefPtr<SQLTransactionBackend> m_backend points to ... >@@ -284,7 +284,7 @@ > // However, there will still be a DatabaseTask pointing to the SQLTransactionBackend (see > // the "When executing the transaction" chain above). This will keep the > // SQLTransactionBackend alive until DatabaseThread::databaseThread() releases its >-// task OwnPtr. >+// task std::unique_ptr. > // > // What happens if a transaction is interrupted? > // ============================================ >@@ -393,7 +393,7 @@ void SQLTransactionBackend::doCleanup() > // m_sqliteTransaction invokes SQLiteTransaction's destructor which does > // just that. We might as well do this unconditionally and free up its > // resources because we're already terminating. >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > } > > // Release the lock on this database >@@ -500,7 +500,7 @@ void SQLTransactionBackend::computeNextS > // The current SQLite transaction should be stopped, as well > if (m_sqliteTransaction) { > m_sqliteTransaction->stop(); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > } > > // Terminate the frontend state machine. This also gets the frontend to >@@ -526,11 +526,11 @@ bool SQLTransactionBackend::shouldPerfor > } > #endif > >-void SQLTransactionBackend::executeSQL(PassOwnPtr<AbstractSQLStatement> statement, >+void SQLTransactionBackend::executeSQL(std::unique_ptr<AbstractSQLStatement> statement, > const String& sqlStatement, const Vector<SQLValue>& arguments, int permissions) > { > RefPtr<SQLStatementBackend> statementBackend; >- statementBackend = SQLStatementBackend::create(statement, sqlStatement, arguments, permissions); >+ statementBackend = SQLStatementBackend::create(std::move(statement), sqlStatement, arguments, permissions); > > if (Database::from(m_database.get())->deleted()) > statementBackend->setDatabaseDeletedError(); >@@ -582,7 +582,7 @@ SQLTransactionState SQLTransactionBacken > } > > ASSERT(!m_sqliteTransaction); >- m_sqliteTransaction = adoptPtr(new SQLiteTransaction(m_database->sqliteDatabase(), m_readOnly)); >+ m_sqliteTransaction = std::make_unique<SQLiteTransaction>(m_database->sqliteDatabase(), m_readOnly); > > m_database->resetDeletes(); > m_database->disableAuthorizer(); >@@ -594,7 +594,7 @@ SQLTransactionState SQLTransactionBacken > ASSERT(!m_database->sqliteDatabase().transactionInProgress()); > m_transactionError = SQLError::create(SQLError::DATABASE_ERR, "unable to begin transaction", > m_database->sqliteDatabase().lastError(), m_database->sqliteDatabase().lastErrorMsg()); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > return nextStateForTransactionError(); > } > >@@ -606,7 +606,7 @@ SQLTransactionState SQLTransactionBacken > m_transactionError = SQLError::create(SQLError::DATABASE_ERR, "unable to read version", > m_database->sqliteDatabase().lastError(), m_database->sqliteDatabase().lastErrorMsg()); > m_database->disableAuthorizer(); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > m_database->enableAuthorizer(); > return nextStateForTransactionError(); > } >@@ -615,7 +615,7 @@ SQLTransactionState SQLTransactionBacken > // Spec 4.3.2.3: Perform preflight steps, jumping to the error callback if they fail > if (m_wrapper && !m_wrapper->performPreflight(this)) { > m_database->disableAuthorizer(); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > m_database->enableAuthorizer(); > m_transactionError = m_wrapper->sqlError(); > if (!m_transactionError) >@@ -799,7 +799,7 @@ SQLTransactionState SQLTransactionBacken > m_sqliteTransaction->rollback(); > > ASSERT(!m_database->sqliteDatabase().transactionInProgress()); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > } > m_database->enableAuthorizer(); > >Index: Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h (working copy) >@@ -34,6 +34,7 @@ > #include "AbstractSQLTransactionBackend.h" > #include "DatabaseBasicTypes.h" > #include "SQLTransactionStateMachine.h" >+#include <memory> > #include <wtf/Deque.h> > #include <wtf/Forward.h> > #include <wtf/text/WTFString.h> >@@ -85,7 +86,7 @@ private: > virtual PassRefPtr<SQLError> transactionError() override; > virtual AbstractSQLStatement* currentStatement() override; > virtual void setShouldRetryCurrentStatement(bool) override; >- virtual void executeSQL(PassOwnPtr<AbstractSQLStatement>, const String& statement, >+ virtual void executeSQL(std::unique_ptr<AbstractSQLStatement>, const String& statement, > const Vector<SQLValue>& arguments, int permissions) override; > > void doCleanup(); >@@ -135,7 +136,7 @@ private: > Mutex m_statementMutex; > Deque<RefPtr<SQLStatementBackend>> m_statementQueue; > >- OwnPtr<SQLiteTransaction> m_sqliteTransaction; >+ std::unique_ptr<SQLiteTransaction> m_sqliteTransaction; > RefPtr<OriginLock> m_originLock; > }; > >Index: Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.cpp >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.cpp (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.cpp (working copy) >@@ -58,7 +58,7 @@ SQLTransactionBackendSync::SQLTransactio > , m_readOnly(readOnly) > , m_hasVersionMismatch(false) > , m_modifiedDatabase(false) >- , m_transactionClient(adoptPtr(new SQLTransactionClient())) >+ , m_transactionClient(std::make_unique<SQLTransactionClient>()) > { > ASSERT(m_database->scriptExecutionContext()->isContextThread()); > } >@@ -142,7 +142,7 @@ ExceptionCode SQLTransactionBackendSync: > m_database->sqliteDatabase().setMaximumSize(m_database->maximumSize()); > > ASSERT(!m_sqliteTransaction); >- m_sqliteTransaction = adoptPtr(new SQLiteTransaction(m_database->sqliteDatabase(), m_readOnly)); >+ m_sqliteTransaction = std::make_unique<SQLiteTransaction>(m_database->sqliteDatabase(), m_readOnly); > > m_database->resetDeletes(); > m_database->disableAuthorizer(); >@@ -154,7 +154,7 @@ ExceptionCode SQLTransactionBackendSync: > ASSERT(!m_database->sqliteDatabase().transactionInProgress()); > m_database->setLastErrorMessage("unable to begin transaction", > m_database->sqliteDatabase().lastError(), m_database->sqliteDatabase().lastErrorMsg()); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > return SQLException::DATABASE_ERR; > } > >@@ -207,7 +207,7 @@ ExceptionCode SQLTransactionBackendSync: > return SQLException::DATABASE_ERR; > } > >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > > // Vacuum the database if anything was deleted. > if (m_database->hadDeletes()) >@@ -225,7 +225,7 @@ void SQLTransactionBackendSync::rollback > m_database->disableAuthorizer(); > if (m_sqliteTransaction) { > m_sqliteTransaction->rollback(); >- m_sqliteTransaction.clear(); >+ m_sqliteTransaction = nullptr; > } > m_database->enableAuthorizer(); > >Index: Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.h >=================================================================== >--- Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.h (revision 163308) >+++ Source/WebCore/Modules/webdatabase/SQLTransactionBackendSync.h (working copy) >@@ -35,6 +35,7 @@ > #if ENABLE(SQL_DATABASE) > > #include "DatabaseBasicTypes.h" >+#include <memory> > #include <wtf/Forward.h> > #include <wtf/RefCounted.h> > #include <wtf/Vector.h> >@@ -73,8 +74,8 @@ private: > bool m_hasVersionMismatch; > > bool m_modifiedDatabase; >- OwnPtr<SQLTransactionClient> m_transactionClient; >- OwnPtr<SQLiteTransaction> m_sqliteTransaction; >+ std::unique_ptr<SQLTransactionClient> m_transactionClient; >+ std::unique_ptr<SQLiteTransaction> m_sqliteTransaction; > > friend class SQLTransactionSync; // FIXME: Remove this once the front-end has been properly isolated. > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 127278
:
221641
|
221722
| 222984