urlmon: Replace also bind_info in set_binding_sink.
This commit is contained in:
parent
93e6ca8747
commit
39f2c63055
|
@ -1077,8 +1077,11 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
|
|||
}
|
||||
|
||||
if(This->to_object) {
|
||||
if(!(This->state & BINDING_OBJAVAIL))
|
||||
if(!(This->state & BINDING_OBJAVAIL)) {
|
||||
IBinding_AddRef(BINDING(This));
|
||||
create_object(This);
|
||||
IBinding_Release(BINDING(This));
|
||||
}
|
||||
}else {
|
||||
STGMEDIUM stgmed;
|
||||
HRESULT hres;
|
||||
|
@ -1519,7 +1522,7 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, I
|
|||
}
|
||||
|
||||
if(binding_ctx) {
|
||||
set_binding_sink(binding->protocol, PROTSINK(binding));
|
||||
set_binding_sink(binding->protocol, PROTSINK(binding), BINDINF(binding));
|
||||
if(binding_ctx->redirect_url)
|
||||
IBindStatusCallback_OnProgress(binding->callback, 0, 0, BINDSTATUS_REDIRECTING, binding_ctx->redirect_url);
|
||||
report_data(binding, 0, 0, 0);
|
||||
|
|
|
@ -382,7 +382,7 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
|
|||
if(This->filter_proxy)
|
||||
IInternetProtocol_Release(PROTOCOL(This->filter_proxy));
|
||||
|
||||
set_binding_sink(PROTOCOL(This), NULL);
|
||||
set_binding_sink(PROTOCOL(This), NULL, NULL);
|
||||
|
||||
if(This->notif_hwnd)
|
||||
release_notif_hwnd(This->notif_hwnd);
|
||||
|
@ -488,7 +488,7 @@ static HRESULT WINAPI BindProtocol_UnlockRequest(IInternetProtocol *iface)
|
|||
return IInternetProtocol_UnlockRequest(This->protocol_handler);
|
||||
}
|
||||
|
||||
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink)
|
||||
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink, IInternetBindInfo *bind_info)
|
||||
{
|
||||
BindProtocol *This = PROTOCOL_THIS(bind_protocol);
|
||||
IInternetProtocolSink *prev_sink;
|
||||
|
@ -505,6 +505,12 @@ void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *s
|
|||
service_provider = InterlockedExchangePointer((void**)&This->service_provider, service_provider);
|
||||
if(service_provider)
|
||||
IServiceProvider_Release(service_provider);
|
||||
|
||||
if(bind_info)
|
||||
IInternetBindInfo_AddRef(bind_info);
|
||||
bind_info = InterlockedExchangePointer((void**)&This->bind_info, bind_info);
|
||||
if(bind_info)
|
||||
IInternetBindInfo_Release(bind_info);
|
||||
}
|
||||
|
||||
IWinInetInfo *get_wininet_info(IInternetProtocol *bind_protocol)
|
||||
|
@ -619,10 +625,7 @@ static HRESULT WINAPI ProtocolHandler_Start(IInternetProtocol *iface, LPCWSTR sz
|
|||
if(urlmon_protocol)
|
||||
IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info);
|
||||
|
||||
IInternetBindInfo_AddRef(pOIBindInfo);
|
||||
This->bind_info = pOIBindInfo;
|
||||
|
||||
set_binding_sink(PROTOCOL(This), pOIProtSink);
|
||||
set_binding_sink(PROTOCOL(This), pOIProtSink, pOIBindInfo);
|
||||
|
||||
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority);
|
||||
if(SUCCEEDED(hres)) {
|
||||
|
@ -670,7 +673,7 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
|
|||
This->filter_proxy = NULL;
|
||||
}
|
||||
|
||||
set_binding_sink(PROTOCOL(This), NULL);
|
||||
set_binding_sink(PROTOCOL(This), NULL, NULL);
|
||||
|
||||
if(This->bind_info) {
|
||||
IInternetBindInfo_Release(This->bind_info);
|
||||
|
|
|
@ -2674,13 +2674,11 @@ static void test_BindToObject(int protocol, DWORD flags)
|
|||
CHECK_CALLED(Obj_OnStopBinding);
|
||||
}
|
||||
|
||||
if(test_protocol != HTTP_TEST || emulate_protocol || !(bindf & BINDF_ASYNCHRONOUS)) {
|
||||
ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
|
||||
ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
|
||||
if(test_protocol != HTTP_TEST || emulate_protocol || !(bindf & BINDF_ASYNCHRONOUS))
|
||||
ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n");
|
||||
}else {
|
||||
todo_wine ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
|
||||
else
|
||||
IBindCtx_Release(bctx);
|
||||
}
|
||||
|
||||
if(emulate_protocol)
|
||||
CoRevokeClassObject(regid);
|
||||
|
|
|
@ -78,7 +78,7 @@ HRESULT bind_to_storage(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
|
|||
HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
|
||||
|
||||
HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol **protocol);
|
||||
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink);
|
||||
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink, IInternetBindInfo *bind_info);
|
||||
IWinInetInfo *get_wininet_info(IInternetProtocol*);
|
||||
|
||||
typedef struct ProtocolVtbl ProtocolVtbl;
|
||||
|
|
Loading…
Reference in New Issue