зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620198 - Part 3: Change type of FunctionInfo::function to nsCOMPtr<mozIStorageFunction>. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65507
This commit is contained in:
Родитель
4fa00c14c3
Коммит
3628030e06
|
@ -847,7 +847,7 @@ nsresult Connection::databaseElementExists(
|
||||||
return convertResultCode(srv);
|
return convertResultCode(srv);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Connection::findFunctionByInstance(nsISupports* aInstance) {
|
bool Connection::findFunctionByInstance(mozIStorageFunction* aInstance) {
|
||||||
sharedDBMutex.assertCurrentThreadOwns();
|
sharedDBMutex.assertCurrentThreadOwns();
|
||||||
|
|
||||||
for (auto iter = mFunctions.Iter(); !iter.Done(); iter.Next()) {
|
for (auto iter = mFunctions.Iter(); !iter.Done(); iter.Next()) {
|
||||||
|
@ -1545,9 +1545,7 @@ nsresult Connection::initializeClone(Connection* aClone, bool aReadOnly) {
|
||||||
const nsACString& key = iter.Key();
|
const nsACString& key = iter.Key();
|
||||||
Connection::FunctionInfo data = iter.UserData();
|
Connection::FunctionInfo data = iter.UserData();
|
||||||
|
|
||||||
mozIStorageFunction* function =
|
rv = aClone->CreateFunction(key, data.numArgs, data.function);
|
||||||
static_cast<mozIStorageFunction*>(data.function.get());
|
|
||||||
rv = aClone->CreateFunction(key, data.numArgs, function);
|
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
NS_WARNING("Failed to copy function to cloned connection");
|
NS_WARNING("Failed to copy function to cloned connection");
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Connection final : public mozIStorageConnection,
|
||||||
* Structure used to describe user functions on the database connection.
|
* Structure used to describe user functions on the database connection.
|
||||||
*/
|
*/
|
||||||
struct FunctionInfo {
|
struct FunctionInfo {
|
||||||
nsCOMPtr<nsISupports> function;
|
nsCOMPtr<mozIStorageFunction> function;
|
||||||
int32_t numArgs;
|
int32_t numArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ class Connection final : public mozIStorageConnection,
|
||||||
nsresult databaseElementExists(enum DatabaseElementType aElementType,
|
nsresult databaseElementExists(enum DatabaseElementType aElementType,
|
||||||
const nsACString& aElementName, bool* _exists);
|
const nsACString& aElementName, bool* _exists);
|
||||||
|
|
||||||
bool findFunctionByInstance(nsISupports* aInstance);
|
bool findFunctionByInstance(mozIStorageFunction* aInstance);
|
||||||
|
|
||||||
static int sProgressHelper(void* aArg);
|
static int sProgressHelper(void* aArg);
|
||||||
// Generic progress handler
|
// Generic progress handler
|
||||||
|
|
Загрузка…
Ссылка в новой задаче