Bug 184697: Return an element-factory even for the unknown namespace to avoid crash.
r=harishd sr=heikki git-svn-id: svn://10.0.0.236/trunk@136381 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a5afbc1f4f
commit
6040b2b8f1
@ -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()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user