mshtml: Store task_magic in HTMLDocumentObj instead of HTMLDocument.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
deee158c00
commit
52a5acaefb
|
@ -1291,7 +1291,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc)
|
|||
|
||||
if(doc->basedoc.window->mon) {
|
||||
/* FIXME: We should find nicer way to do this */
|
||||
remove_target_tasks(doc->basedoc.task_magic);
|
||||
remove_target_tasks(doc->task_magic);
|
||||
|
||||
mon = doc->basedoc.window->mon;
|
||||
IMoniker_AddRef(mon);
|
||||
|
|
|
@ -4858,7 +4858,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
|
|||
|
||||
doc->outer_unk = outer;
|
||||
doc->dispex = dispex;
|
||||
doc->task_magic = get_task_target_magic();
|
||||
|
||||
HTMLDocument_Persist_Init(doc);
|
||||
HTMLDocument_OleCmd_Init(doc);
|
||||
|
@ -4869,13 +4868,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
|
|||
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->IHTMLDocument2_iface, HTMLDocument_cpc);
|
||||
}
|
||||
|
||||
static void destroy_htmldoc(HTMLDocument *This)
|
||||
{
|
||||
remove_target_tasks(This->task_magic);
|
||||
|
||||
ConnectionPointContainer_Destroy(&This->cp_container);
|
||||
}
|
||||
|
||||
static inline HTMLDocumentNode *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, HTMLDocumentNode, node);
|
||||
|
@ -4925,7 +4917,7 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
|
|||
}
|
||||
|
||||
heap_free(This->event_vector);
|
||||
destroy_htmldoc(&This->basedoc);
|
||||
ConnectionPointContainer_Destroy(&This->basedoc.cp_container);
|
||||
}
|
||||
|
||||
static HRESULT HTMLDocumentNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
|
||||
|
@ -5298,7 +5290,8 @@ static ULONG WINAPI HTMLDocumentObj_Release(IUnknown *iface)
|
|||
DestroyWindow(This->hwnd);
|
||||
heap_free(This->mime);
|
||||
|
||||
destroy_htmldoc(&This->basedoc);
|
||||
remove_target_tasks(This->task_magic);
|
||||
ConnectionPointContainer_Destroy(&This->basedoc.cp_container);
|
||||
release_dispex(&This->dispex);
|
||||
|
||||
if(This->nscontainer)
|
||||
|
@ -5429,6 +5422,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
|
|||
doc->is_mhtml = is_mhtml;
|
||||
|
||||
doc->usermode = UNKNOWN_USERMODE;
|
||||
doc->task_magic = get_task_target_magic();
|
||||
|
||||
init_binding_ui(doc);
|
||||
|
||||
|
|
|
@ -602,8 +602,6 @@ struct HTMLDocument {
|
|||
|
||||
HTMLOuterWindow *window;
|
||||
|
||||
LONG task_magic;
|
||||
|
||||
ConnectionPointContainer cp_container;
|
||||
};
|
||||
|
||||
|
@ -672,6 +670,7 @@ struct HTMLDocumentObj {
|
|||
LPWSTR mime;
|
||||
|
||||
DWORD update;
|
||||
LONG task_magic;
|
||||
};
|
||||
|
||||
typedef struct nsWeakReference nsWeakReference;
|
||||
|
|
|
@ -424,7 +424,7 @@ HRESULT set_moniker(HTMLOuterWindow *window, IMoniker *mon, IUri *nav_uri, IBind
|
|||
|
||||
task = heap_alloc(sizeof(docobj_task_t));
|
||||
task->doc = doc_obj;
|
||||
hres = push_task(&task->header, set_progress_proc, NULL, doc_obj->basedoc.task_magic);
|
||||
hres = push_task(&task->header, set_progress_proc, NULL, doc_obj->task_magic);
|
||||
if(FAILED(hres)) {
|
||||
CoTaskMemFree(url);
|
||||
return hres;
|
||||
|
@ -435,7 +435,7 @@ HRESULT set_moniker(HTMLOuterWindow *window, IMoniker *mon, IUri *nav_uri, IBind
|
|||
download_task->doc = doc_obj;
|
||||
download_task->set_download = set_download;
|
||||
download_task->url = url;
|
||||
return push_task(&download_task->header, set_downloading_proc, set_downloading_task_destr, doc_obj->basedoc.task_magic);
|
||||
return push_task(&download_task->header, set_downloading_proc, set_downloading_task_destr, doc_obj->task_magic);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue