From 4745fd03d4c246be377214fb6d7d39f599b9439d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 27 May 2014 11:28:44 +0200 Subject: [PATCH] mshtml: Call unlink from HTMLDOMNode::Release. --- dlls/mshtml/htmldoc.c | 6 +----- dlls/mshtml/htmlnode.c | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index dd4949f4db7..a9db9202108 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -4330,11 +4330,7 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface) This->nsnode_selector = NULL; } - if(This->nsdoc) { - assert(!This->window); - release_document_mutation(This); - nsIDOMHTMLDocument_Release(This->nsdoc); - }else if(This->window) { + if(!This->nsdoc && This->window) { /* document fragments own reference to inner window */ IHTMLWindow2_Release(&This->window->base.IHTMLWindow2_iface); This->window = NULL; diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 42e7c6a4d00..a89b0ca1862 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -492,6 +492,8 @@ static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) { + if(This->vtbl->unlink) + This->vtbl->unlink(This); This->vtbl->destructor(This); release_dispex(&This->dispex); heap_free(This); -- 2.11.4.GIT