Module: wine Branch: master Commit: f878c9983d5b875ede709a5015ded368ccb653b7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f878c9983d5b875ede709a5015...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Jun 26 12:34:36 2012 +0200
mshtml: Share nselem reference with nsnode.
---
dlls/mshtml/htmlelem.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 7ab1856..5f59385 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
- #include <stdarg.h> +#include <assert.h>
#define COBJMACROS
@@ -1772,13 +1772,14 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen init_dispex(&This->node.dispex, (IUnknown*)&This->IHTMLElement_iface, dispex_data ? dispex_data : &HTMLElement_dispex);
- if(nselem) - nsIDOMHTMLElement_AddRef(nselem); - This->nselem = nselem; - - if(nselem) + if(nselem) { HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem);
+ /* No AddRef, share reference with HTMLDOMNode */ + assert((nsIDOMNode*)nselem == This->node.nsnode); + This->nselem = nselem; + } + ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface); }