diff --git "a/dll/win32/mshtml/navigate.c" "b/dll/win32/mshtml/navigate.c"
index a7b28eb2af0..bd54662bccd 100644
--- "a/dll/win32/mshtml/navigate.c"
+++ "b/dll/win32/mshtml/navigate.c"
@@ -957,6 +957,36 @@ static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result)
}
}
+#ifdef __REACTOS__
+HRESULT map_nsresult(nsresult nsres)
+{
+ switch(nsres) {
+ case NS_OK:
+ return S_OK;
+ case NS_ERROR_OUT_OF_MEMORY:
+ return E_OUTOFMEMORY;
+ case NS_ERROR_NOT_IMPLEMENTED:
+ return E_NOTIMPL;
+ case NS_NOINTERFACE:
+ return E_NOINTERFACE;
+ case NS_ERROR_INVALID_POINTER:
+ return E_POINTER;
+ case NS_ERROR_INVALID_ARG:
+ return E_INVALIDARG;
+ case NS_ERROR_UNEXPECTED:
+ return E_UNEXPECTED;
+ /* Only defined in Wine */
+// case NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR:
+// return 0x80700007; /* according to tests */
+// case NS_ERROR_DOM_SYNTAX_ERR:
+// return E_INVALIDARG; /* FIXME: Throw SyntaxError for IE9+ modes */
+ case NS_BINDING_ABORTED:
+ return E_ABORT;
+ }
+ return E_FAIL;
+}
+#endif
+
static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
{
DWORD read;
@@ -1041,8 +1071,12 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, This->nscontext,
&This->nsstream->nsIInputStream_iface, This->bsc.readed-This->nsstream->buf_size,
This->nsstream->buf_size);
- if(NS_FAILED(nsres))
- ERR("OnDataAvailable failed: %08x\n", nsres);
+#ifdef __REACTOS__
+ if(NS_FAILED(nsres)) {
+ WARN("OnDataAvailable failed: %08lx\n", nsres);
+ return map_nsresult(nsres);
+ }
+#endif
if(This->nsstream->buf_size == sizeof(This->nsstream->buf)) {
ERR("buffer is full\n");