mshtml: Added nsIChannel::Cancel implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
11a6bfc673
commit
86c097142b
|
@ -55,6 +55,8 @@ typedef struct {
|
|||
REQUEST_METHOD request_method;
|
||||
struct list response_headers;
|
||||
struct list request_headers;
|
||||
|
||||
nsChannelBSC *binding;
|
||||
} nsChannel;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -927,6 +927,8 @@ static HRESULT on_start_nsrequest(nsChannelBSC *This)
|
|||
{
|
||||
nsresult nsres;
|
||||
|
||||
This->nschannel->binding = This;
|
||||
|
||||
/* FIXME: it's needed for http connections from BindToObject. */
|
||||
if(!This->nschannel->response_status)
|
||||
This->nschannel->response_status = 200;
|
||||
|
@ -972,12 +974,16 @@ static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result)
|
|||
WARN("OnStopRequest failed: %08x\n", nsres);
|
||||
}
|
||||
|
||||
if(This->nschannel && This->nschannel->load_group) {
|
||||
if(This->nschannel) {
|
||||
if(This->nschannel->load_group) {
|
||||
nsres = nsILoadGroup_RemoveRequest(This->nschannel->load_group,
|
||||
(nsIRequest*)&This->nschannel->nsIHttpChannel_iface, NULL, request_result);
|
||||
if(NS_FAILED(nsres))
|
||||
ERR("RemoveRequest failed: %08x\n", nsres);
|
||||
}
|
||||
if(This->nschannel->binding == This)
|
||||
This->nschannel->binding = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
|
||||
|
@ -1217,8 +1223,11 @@ static void nsChannelBSC_destroy(BSCallback *bsc)
|
|||
{
|
||||
nsChannelBSC *This = nsChannelBSC_from_BSCallback(bsc);
|
||||
|
||||
if(This->nschannel)
|
||||
if(This->nschannel) {
|
||||
if(This->nschannel->binding == This)
|
||||
This->nschannel->binding = NULL;
|
||||
nsIHttpChannel_Release(&This->nschannel->nsIHttpChannel_iface);
|
||||
}
|
||||
if(This->nslistener)
|
||||
nsIStreamListener_Release(This->nslistener);
|
||||
if(This->nscontext)
|
||||
|
|
|
@ -617,9 +617,13 @@ static nsresult NSAPI nsChannel_Cancel(nsIHttpChannel *iface, nsresult aStatus)
|
|||
{
|
||||
nsChannel *This = impl_from_nsIHttpChannel(iface);
|
||||
|
||||
FIXME("(%p)->(%08x)\n", This, aStatus);
|
||||
TRACE("(%p)->(%08x)\n", This, aStatus);
|
||||
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
if(This->binding && This->binding->bsc.binding)
|
||||
IBinding_Abort(This->binding->bsc.binding);
|
||||
else
|
||||
WARN("No binding to cancel\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsChannel_Suspend(nsIHttpChannel *iface)
|
||||
|
|
Loading…
Reference in New Issue