From 60651a924f8e2e00733a186555680962688ea9e9 Mon Sep 17 00:00:00 2001 From: Michael Layzell Date: Wed, 7 Sep 2016 13:48:23 -0400 Subject: [PATCH] Bug 1301127 - Make nsNavHistoryFolderResultNode QueryInterface to mozIStorageStatementCallback, r=smaug MozReview-Commit-ID: 5CPNIz3w4Iy --- storage/mozStorageAsyncStatementExecution.cpp | 10 ++-------- toolkit/components/places/nsNavHistoryResult.cpp | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/storage/mozStorageAsyncStatementExecution.cpp b/storage/mozStorageAsyncStatementExecution.cpp index ce43b668e4b5..add32131a308 100644 --- a/storage/mozStorageAsyncStatementExecution.cpp +++ b/storage/mozStorageAsyncStatementExecution.cpp @@ -70,10 +70,7 @@ public: // Hold a strong reference to the callback while notifying it, so that if // it spins the event loop, the callback won't be released and freed out // from under us. - // - // We can't put it in a nsCOMPtr, as sometimes mCallback doesn't - // QueryInterface to a mozIStorageStatementCallback, despite being one - RefPtr callback = mCallback; + nsCOMPtr callback = mCallback; (void)callback->HandleResult(mResults); } @@ -108,10 +105,7 @@ public: // Hold a strong reference to the callback while notifying it, so that if // it spins the event loop, the callback won't be released and freed out // from under us. - // - // We can't put it in a nsCOMPtr, as sometimes mCallback doesn't - // QueryInterface to a mozIStorageStatementCallback, despite being one - RefPtr callback = mCallback; + nsCOMPtr callback = mCallback; (void)callback->HandleError(mErrorObj); } diff --git a/toolkit/components/places/nsNavHistoryResult.cpp b/toolkit/components/places/nsNavHistoryResult.cpp index 8382404d70ba..370b4d6bf0d2 100644 --- a/toolkit/components/places/nsNavHistoryResult.cpp +++ b/toolkit/components/places/nsNavHistoryResult.cpp @@ -3014,7 +3014,8 @@ nsNavHistoryQueryResultNode::OnItemMoved(int64_t aFolder, */ NS_IMPL_ISUPPORTS_INHERITED(nsNavHistoryFolderResultNode, nsNavHistoryContainerResultNode, - nsINavHistoryQueryResultNode) + nsINavHistoryQueryResultNode, + mozIStorageStatementCallback) nsNavHistoryFolderResultNode::nsNavHistoryFolderResultNode( const nsACString& aTitle, nsNavHistoryQueryOptions* aOptions,