Skip to content

Commit

Permalink
Bug 1301127 - Make nsNavHistoryFolderResultNode QueryInterface to moz…
Browse files Browse the repository at this point in the history
…IStorageStatementCallback, r=smaug

MozReview-Commit-ID: 5CPNIz3w4Iy
  • Loading branch information
mystor committed Sep 7, 2016
1 parent 07fc3ca commit 98a00fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 2 additions & 8 deletions storage/mozStorageAsyncStatementExecution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ class CallbackResultNotifier : public Runnable
// 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<mozIStorageStatementCallback> callback = mCallback;
nsCOMPtr<mozIStorageStatementCallback> callback = mCallback;

(void)callback->HandleResult(mResults);
}
Expand Down Expand Up @@ -108,10 +105,7 @@ class ErrorNotifier : public Runnable
// 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<mozIStorageStatementCallback> callback = mCallback;
nsCOMPtr<mozIStorageStatementCallback> callback = mCallback;

(void)callback->HandleError(mErrorObj);
}
Expand Down
3 changes: 2 additions & 1 deletion toolkit/components/places/nsNavHistoryResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 98a00fb

Please sign in to comment.