From 700d52dc1aa9b3040917fc19fb494d5783077b09 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Wed, 24 Feb 2021 12:49:55 +0000 Subject: [PATCH] Bug 1693541 - Improve uses of nsBaseHashtable and descendants by using Contains instead of Get in storage. r=mak Differential Revision: https://phabricator.services.mozilla.com/D106098 --- storage/mozStorageConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp index 340fa527d41d..b45fddda0717 100644 --- a/storage/mozStorageConnection.cpp +++ b/storage/mozStorageConnection.cpp @@ -2162,7 +2162,7 @@ Connection::CreateFunction(const nsACString& aFunctionName, // Check to see if this function is already defined. We only check the name // because a function can be defined with the same body but different names. SQLiteMutexAutoLock lockedScope(sharedDBMutex); - NS_ENSURE_FALSE(mFunctions.Get(aFunctionName, nullptr), NS_ERROR_FAILURE); + NS_ENSURE_FALSE(mFunctions.Contains(aFunctionName), NS_ERROR_FAILURE); int srv = ::sqlite3_create_function( mDBConn, nsPromiseFlatCString(aFunctionName).get(), aNumArguments,