Commit 25b4d6be authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use return_nsstr helper in IHTMLDocument5::get_compatMode.

parent e56e9c11
......@@ -2882,7 +2882,7 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
nsAString mode_str;
const PRUnichar *mode;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
......@@ -2892,13 +2892,8 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *
}
nsAString_Init(&mode_str, NULL);
nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
nsAString_GetData(&mode_str, &mode);
*p = SysAllocString(mode);
nsAString_Finish(&mode_str);
return S_OK;
nsres = nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
return return_nsstr(nsres, &mode_str, p);
}
static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment