зеркало из https://github.com/mozilla/gecko-dev.git
Bug 184697: Return an element-factory even for the unknown namespace to avoid crash.
r=harishd sr=heikki
This commit is contained in:
Родитель
9d56c19334
Коммит
e4a2e08be6
|
@ -461,6 +461,15 @@ NameSpaceManagerImpl::GetElementFactory(PRInt32 aNameSpaceID,
|
|||
{
|
||||
*aElementFactory = nsnull;
|
||||
|
||||
// Parsing should have aborted before we get here, but for now we'll have to
|
||||
// live with returning the default factory. Bugs 184697 and 103255
|
||||
if (aNameSpaceID == kNameSpaceID_Unknown) {
|
||||
*aElementFactory = mDefaultElementFactory;
|
||||
NS_ADDREF(*aElementFactory);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(aNameSpaceID >= 0, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (aNameSpaceID < mElementFactoryArray.Count()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче