mshtml: Use return_nsstr helper in IHTMLBodyElement::get_background implementation.

This commit is contained in:
Jacek Caban 2012-04-13 12:02:11 +02:00 committed by Alexandre Julliard
parent 4c66a4626b
commit b43cd188df
1 changed files with 1 additions and 14 deletions

View File

@ -293,21 +293,8 @@ static HRESULT WINAPI HTMLBodyElement_get_background(IHTMLBodyElement *iface, BS
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&background_str, NULL);
nsres = nsIDOMHTMLBodyElement_GetBackground(This->nsbody, &background_str);
if(NS_SUCCEEDED(nsres)) {
const PRUnichar *background;
nsAString_GetData(&background_str, &background);
*p = *background ? SysAllocString(background) : NULL;
}else {
ERR("GetBackground failed: %08x\n", nsres);
*p = NULL;
}
nsAString_Finish(&background_str);
TRACE("*p = %s\n", debugstr_w(*p));
return S_OK;
return return_nsstr(nsres, &background_str, p);
}
static HRESULT WINAPI HTMLBodyElement_put_bgProperties(IHTMLBodyElement *iface, BSTR v)