From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/xmlhttprequest.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index a75a8552ddc..f86cd14393b 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -542,27 +542,33 @@ static HRESULT WINAPI HTMLXMLHttpRequest_get_responseBody(IHTMLXMLHttpRequest *i return E_NOTIMPL; }
-static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText(IHTMLXMLHttpRequest *iface, BSTR *p) +static HRESULT WINAPI get_response_text(struct xhr *xhr, BSTR *p) { - HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface); nsAString nsstr; nsresult nsres;
- TRACE("(%p)->(%p)\n", This, p); - if(!p) return E_POINTER;
- if(This->xhr.ready_state < READYSTATE_INTERACTIVE) { + if(xhr->ready_state < READYSTATE_INTERACTIVE) { *p = NULL; return S_OK; }
nsAString_Init(&nsstr, NULL); - nsres = nsIXMLHttpRequest_GetResponseText(This->xhr.nsxhr, &nsstr); + nsres = nsIXMLHttpRequest_GetResponseText(xhr->nsxhr, &nsstr); return return_nsstr(nsres, &nsstr, p); }
+static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText(IHTMLXMLHttpRequest *iface, BSTR *p) +{ + HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface); + + TRACE("(%p)->(%p)\n", This, p); + + return get_response_text(&This->xhr, p); +} + static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML(IHTMLXMLHttpRequest *iface, IDispatch **p) { HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);