зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
eeedc67ff4
Коммит
700d52dc1a
|
@ -2162,7 +2162,7 @@ Connection::CreateFunction(const nsACString& aFunctionName,
|
||||||
// Check to see if this function is already defined. We only check the name
|
// 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.
|
// because a function can be defined with the same body but different names.
|
||||||
SQLiteMutexAutoLock lockedScope(sharedDBMutex);
|
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(
|
int srv = ::sqlite3_create_function(
|
||||||
mDBConn, nsPromiseFlatCString(aFunctionName).get(), aNumArguments,
|
mDBConn, nsPromiseFlatCString(aFunctionName).get(), aNumArguments,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче