зеркало из https://github.com/mozilla/pjs.git
Landing fix for bug 244952, patch by chantepie@altern.org. Fixing crash when creating multiple proxy instances for the same webservice. r=keeda@hotpop.com, sr=jst@mozilla.org
This commit is contained in:
Родитель
4960d71bc5
Коммит
987814a997
|
@ -760,6 +760,19 @@ nsSchemaLoader::ProcessSchemaElement(nsIDOMElement* aElement,
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsAutoString targetNamespace;
|
||||
schema->GetTargetNamespace(targetNamespace);
|
||||
nsStringKey key(targetNamespace);
|
||||
nsCOMPtr<nsISupports> old = getter_AddRefs(mSchemas.Get(&key));
|
||||
nsCOMPtr<nsISchema> os = do_QueryInterface(old);
|
||||
|
||||
if (os) {
|
||||
*_retval = os;
|
||||
NS_ADDREF(*_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
rv = schemaInst->Init();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -837,9 +850,6 @@ nsSchemaLoader::ProcessSchemaElement(nsIDOMElement* aElement,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsAutoString targetNamespace;
|
||||
schema->GetTargetNamespace(targetNamespace);
|
||||
nsStringKey key(targetNamespace);
|
||||
mSchemas.Put(&key, schema);
|
||||
|
||||
*_retval = schema;
|
||||
|
|
Загрузка…
Ссылка в новой задаче