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
This commit is contained in:
Simon Giesecke 2021-02-24 12:49:55 +00:00
Родитель eeedc67ff4
Коммит 700d52dc1a
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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,