mshtml: Share nselem reference with nsnode.
This commit is contained in:
parent
8c396ed437
commit
f878c9983d
|
@ -16,8 +16,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
|
|
||||||
|
@ -1772,13 +1772,14 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
|
||||||
init_dispex(&This->node.dispex, (IUnknown*)&This->IHTMLElement_iface,
|
init_dispex(&This->node.dispex, (IUnknown*)&This->IHTMLElement_iface,
|
||||||
dispex_data ? dispex_data : &HTMLElement_dispex);
|
dispex_data ? dispex_data : &HTMLElement_dispex);
|
||||||
|
|
||||||
if(nselem)
|
if(nselem) {
|
||||||
nsIDOMHTMLElement_AddRef(nselem);
|
|
||||||
This->nselem = nselem;
|
|
||||||
|
|
||||||
if(nselem)
|
|
||||||
HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)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);
|
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue