mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug=45018
author=ashuk Files modified jni/org_mozilla_dom_DocumentImpl.cpp This fix makes sure that corner case where call to nsIDOMDocument::CreateEntityReference returns NS_OK, but a null return value for the nsIDOMEntityReference is handled properly thro the exception handling mechanism.
This commit is contained in:
parent
2945ee5e62
commit
1d5b5ee913
@ -315,7 +315,7 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_dom_DocumentImpl_createEntityReferenc
|
||||
nsresult rv = doc->CreateEntityReference(*name, &ret);
|
||||
nsMemory::Free(name);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (NS_FAILED(rv) || ret == nsnull) {
|
||||
JavaDOMGlobals::ExceptionType exceptionType = JavaDOMGlobals::EXCEPTION_RUNTIME;
|
||||
if (NS_ERROR_GET_MODULE(rv) == NS_ERROR_MODULE_DOM &&
|
||||
(rv == NS_ERROR_DOM_INVALID_CHARACTER_ERR ||
|
||||
|
Loading…
Reference in New Issue
Block a user