Commit a29101b0 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mshtml: COM cleanup for the nsIHttpChannel iface.

parent 6c075b6d
......@@ -483,7 +483,7 @@ typedef enum {
} REQUEST_METHOD;
typedef struct {
const nsIHttpChannelVtbl *lpHttpChannelVtbl;
nsIHttpChannel nsIHttpChannel_iface;
const nsIUploadChannelVtbl *lpUploadChannelVtbl;
const nsIHttpChannelInternalVtbl *lpIHttpChannelInternalVtbl;
......@@ -633,8 +633,6 @@ struct HTMLDocumentNode {
#define NSRUNNABLE(x) ((nsIRunnable*) &(x)->lpIRunnableVtbl)
#define NSCHANNEL(x) ((nsIChannel*) &(x)->lpHttpChannelVtbl)
#define NSHTTPCHANNEL(x) ((nsIHttpChannel*) &(x)->lpHttpChannelVtbl)
#define NSUPCHANNEL(x) ((nsIUploadChannel*) &(x)->lpUploadChannelVtbl)
#define NSHTTPINTERNAL(x) ((nsIHttpChannelInternal*) &(x)->lpIHttpChannelInternalVtbl)
......
......@@ -903,7 +903,7 @@ static HRESULT on_start_nsrequest(nsChannelBSC *This)
This->nschannel->response_status = 200;
nsres = nsIStreamListener_OnStartRequest(This->nslistener,
(nsIRequest*)NSCHANNEL(This->nschannel), This->nscontext);
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, This->nscontext);
if(NS_FAILED(nsres)) {
FIXME("OnStartRequest failed: %08x\n", nsres);
return E_FAIL;
......@@ -942,14 +942,15 @@ static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result)
if(This->nslistener) {
nsres = nsIStreamListener_OnStopRequest(This->nslistener,
(nsIRequest*)NSCHANNEL(This->nschannel), This->nscontext, request_result);
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, This->nscontext,
request_result);
if(NS_FAILED(nsres))
WARN("OnStopRequet failed: %08x\n", nsres);
}
if(This->nschannel->load_group) {
nsres = nsILoadGroup_RemoveRequest(This->nschannel->load_group,
(nsIRequest*)NSCHANNEL(This->nschannel), NULL, request_result);
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, NULL, request_result);
if(NS_FAILED(nsres))
ERR("RemoveRequest failed: %08x\n", nsres);
}
......@@ -1011,7 +1012,7 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
This->bsc.readed += This->nsstream->buf_size;
nsres = nsIStreamListener_OnDataAvailable(This->nslistener,
(nsIRequest*)NSCHANNEL(This->nschannel), This->nscontext,
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, This->nscontext,
NSINSTREAM(This->nsstream), This->bsc.readed-This->nsstream->buf_size,
This->nsstream->buf_size);
if(NS_FAILED(nsres))
......@@ -1033,7 +1034,7 @@ static void nsChannelBSC_destroy(BSCallback *bsc)
nsChannelBSC *This = NSCHANNELBSC_THIS(bsc);
if(This->nschannel)
nsIChannel_Release(NSCHANNEL(This->nschannel));
nsIChannel_Release(&This->nschannel->nsIHttpChannel_iface);
if(This->nslistener)
nsIStreamListener_Release(This->nslistener);
if(This->nscontext)
......@@ -1356,7 +1357,7 @@ HRESULT channelbsc_load_stream(nsChannelBSC *bscallback, IStream *stream)
void channelbsc_set_channel(nsChannelBSC *This, nsChannel *channel, nsIStreamListener *listener, nsISupports *context)
{
nsIChannel_AddRef(NSCHANNEL(channel));
nsIChannel_AddRef(&channel->nsIHttpChannel_iface);
This->nschannel = channel;
nsIStreamListener_AddRef(listener);
......
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