Bug 245627. Minor deCOMtamination of HTML element constructor functions. r+sr=jst
This commit is contained in:
@@ -644,10 +644,11 @@ CreateHTMLImgElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
*aResult = nsnull;
|
||||
if (aOuter)
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
nsIHTMLContent* inst;
|
||||
// Note! NS_NewHTMLImageElement is special cased to handle a null nodeinfo
|
||||
nsresult rv = NS_NewHTMLImageElement(&inst, nsnull);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIHTMLContent* inst = NS_NewHTMLImageElement(nsnull);
|
||||
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
if (inst) {
|
||||
NS_ADDREF(inst);
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
}
|
||||
@@ -694,10 +695,11 @@ CreateHTMLOptionElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
*aResult = nsnull;
|
||||
if (aOuter)
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
nsIHTMLContent* inst;
|
||||
// Note! NS_NewHTMLOptionElement is special cased to handle a null nodeinfo
|
||||
nsresult rv = NS_NewHTMLOptionElement(&inst, nsnull);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIHTMLContent* inst = NS_NewHTMLOptionElement(nsnull);
|
||||
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
if (inst) {
|
||||
NS_ADDREF(inst);
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user