Skip to content

Commit

Permalink
Bug 1639658 - make AsyncExecuteStatements use mozilla::Runnable; r=asuth
Browse files Browse the repository at this point in the history
  • Loading branch information
froydnj committed May 20, 2020
1 parent 943483e commit 0541624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions storage/mozStorageAsyncStatementExecution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ nsresult AsyncExecuteStatements::execute(
AsyncExecuteStatements::AsyncExecuteStatements(
StatementDataArray& aStatements, Connection* aConnection,
sqlite3* aNativeConnection, mozIStorageStatementCallback* aCallback)
: mConnection(aConnection),
: Runnable("AsyncExecuteStatements"),
mConnection(aConnection),
mNativeConnection(aNativeConnection),
mHasTransaction(false),
mCallback(aCallback),
Expand Down Expand Up @@ -433,8 +434,8 @@ nsresult AsyncExecuteStatements::notifyResultsOnCallingThread(
return NS_OK;
}

NS_IMPL_ISUPPORTS(AsyncExecuteStatements, nsIRunnable,
mozIStoragePendingStatement)
NS_IMPL_ISUPPORTS_INHERITED(AsyncExecuteStatements, Runnable,
mozIStoragePendingStatement)

bool AsyncExecuteStatements::statementsNeedTransaction() {
// If there is more than one write statement, run in a transaction.
Expand Down
6 changes: 3 additions & 3 deletions storage/mozStorageAsyncStatementExecution.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "mozilla/Mutex.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Attributes.h"
#include "nsIRunnable.h"
#include "nsThreadUtils.h"

#include "SQLiteMutex.h"
#include "mozIStoragePendingStatement.h"
Expand All @@ -31,10 +31,10 @@ class StatementData;
} // namespace mozilla

namespace mozilla::storage {
class AsyncExecuteStatements final : public nsIRunnable,
class AsyncExecuteStatements final : public Runnable,
public mozIStoragePendingStatement {
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIRUNNABLE
NS_DECL_MOZISTORAGEPENDINGSTATEMENT

Expand Down

0 comments on commit 0541624

Please sign in to comment.