mshtml: Use heap_alloc_zero for allocating node objects.

This commit is contained in:
Jacek Caban 2008-04-23 16:44:21 +02:00 committed by Alexandre Julliard
parent e610d2ff12
commit 38b14274fb
10 changed files with 10 additions and 11 deletions

View File

@ -481,7 +481,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLAnchorElement *ret = heap_alloc(sizeof(HTMLAnchorElement));
HTMLAnchorElement *ret = heap_alloc_zero(sizeof(HTMLAnchorElement));
HTMLElement_Init(&ret->element);

View File

@ -598,7 +598,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLBodyElement *ret = heap_alloc(sizeof(HTMLBodyElement));
HTMLBodyElement *ret = heap_alloc_zero(sizeof(HTMLBodyElement));
nsresult nsres;
TRACE("(%p)->(%p)\n", ret, nselem);

View File

@ -1336,7 +1336,7 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
ret = HTMLTextAreaElement_Create(nselem);
if(!ret) {
ret = heap_alloc(sizeof(HTMLElement));
ret = heap_alloc_zero(sizeof(HTMLElement));
HTMLElement_Init(ret);
}

View File

@ -1055,7 +1055,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLInputElement *ret = heap_alloc(sizeof(HTMLInputElement));
HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement));
nsresult nsres;
HTMLElement_Init(&ret->element);

View File

@ -352,14 +352,13 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
ret = &HTMLElement_Create(nsnode)->node;
break;
default:
ret = heap_alloc(sizeof(HTMLDOMNode));
ret = heap_alloc_zero(sizeof(HTMLDOMNode));
ret->vtbl = &HTMLDOMNodeImplVtbl;
}
ret->lpHTMLDOMNodeVtbl = &HTMLDOMNodeVtbl;
ret->ref = 1;
ret->doc = doc;
ret->event_target = NULL;
nsIDOMNode_AddRef(nsnode);
ret->nsnode = nsnode;

View File

@ -333,7 +333,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLOptionElement *ret = heap_alloc(sizeof(HTMLOptionElement));
HTMLOptionElement *ret = heap_alloc_zero(sizeof(HTMLOptionElement));
nsresult nsres;
HTMLElement_Init(&ret->element);

View File

@ -288,7 +288,7 @@ static const NodeImplVtbl HTMLScriptElementImplVtbl = {
HTMLElement *HTMLScriptElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLScriptElement *ret = heap_alloc(sizeof(HTMLScriptElement));
HTMLScriptElement *ret = heap_alloc_zero(sizeof(HTMLScriptElement));
nsresult nsres;
HTMLElement_Init(&ret->element);

View File

@ -422,7 +422,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
HTMLElement *HTMLSelectElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLSelectElement *ret = heap_alloc(sizeof(HTMLSelectElement));
HTMLSelectElement *ret = heap_alloc_zero(sizeof(HTMLSelectElement));
nsresult nsres;
HTMLElement_Init(&ret->element);

View File

@ -546,7 +546,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = {
HTMLElement *HTMLTable_Create(nsIDOMHTMLElement *nselem)
{
HTMLTable *ret = heap_alloc(sizeof(HTMLTable));
HTMLTable *ret = heap_alloc_zero(sizeof(HTMLTable));
HTMLElement_Init(&ret->element);

View File

@ -402,7 +402,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
HTMLElement *HTMLTextAreaElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLTextAreaElement *ret = heap_alloc(sizeof(HTMLTextAreaElement));
HTMLTextAreaElement *ret = heap_alloc_zero(sizeof(HTMLTextAreaElement));
nsresult nsres;
HTMLElement_Init(&ret->element);