From a084d1db62b89392803d2f366d7f1b26a7a46ce8 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 5 Dec 2007 21:52:31 +0100 Subject: [PATCH] mshtml: Rename the wrappers around HeapAlloc() &Co to use the new standard naming. --- dlls/mshtml/conpoint.c | 6 +++--- dlls/mshtml/editor.c | 8 ++++---- dlls/mshtml/htmlanchor.c | 2 +- dlls/mshtml/htmlbody.c | 2 +- dlls/mshtml/htmldoc.c | 6 +++--- dlls/mshtml/htmlelem.c | 26 +++++++++++++------------- dlls/mshtml/htmlinput.c | 2 +- dlls/mshtml/htmlnode.c | 4 ++-- dlls/mshtml/htmloption.c | 6 +++--- dlls/mshtml/htmlselect.c | 2 +- dlls/mshtml/htmlstyle.c | 4 ++-- dlls/mshtml/htmlstylesheet.c | 8 ++++---- dlls/mshtml/htmltable.c | 2 +- dlls/mshtml/htmltextarea.c | 2 +- dlls/mshtml/htmlwindow.c | 8 ++++---- dlls/mshtml/install.c | 30 +++++++++++++++--------------- dlls/mshtml/loadopts.c | 14 +++++++------- dlls/mshtml/main.c | 12 ++++++------ dlls/mshtml/mshtml_private.h | 8 ++++---- dlls/mshtml/navigate.c | 24 ++++++++++++------------ dlls/mshtml/nsembed.c | 4 ++-- dlls/mshtml/nsevents.c | 2 +- dlls/mshtml/nsio.c | 24 ++++++++++++------------ dlls/mshtml/persist.c | 10 +++++----- dlls/mshtml/protocol.c | 36 ++++++++++++++++++------------------ dlls/mshtml/selection.c | 4 ++-- dlls/mshtml/service.c | 4 ++-- dlls/mshtml/task.c | 6 +++--- dlls/mshtml/txtrange.c | 12 ++++++------ dlls/mshtml/view.c | 2 +- 30 files changed, 140 insertions(+), 140 deletions(-) diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c index 8a8be4cfb2e..cad4877fdee 100644 --- a/dlls/mshtml/conpoint.c +++ b/dlls/mshtml/conpoint.c @@ -152,9 +152,9 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown * } if(i == This->sinks_size) - This->sinks = mshtml_realloc(This->sinks,(++This->sinks_size)*sizeof(*This->sinks)); + This->sinks = heap_realloc(This->sinks,(++This->sinks_size)*sizeof(*This->sinks)); }else { - This->sinks = mshtml_alloc(sizeof(*This->sinks)); + This->sinks = heap_alloc(sizeof(*This->sinks)); This->sinks_size = 1; i = 0; } @@ -223,7 +223,7 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This) IUnknown_Release(This->sinks[i].unk); } - mshtml_free(This->sinks); + heap_free(This->sinks); } #define CONPTCONT_THIS(iface) DEFINE_THIS(ConnectionPointContainer, ConnectionPointContainer, iface) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 53938e94116..2f695015e36 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -569,12 +569,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, TRACE("%s\n", debugstr_w(V_BSTR(in))); len = WideCharToMultiByte(CP_ACP, 0, V_BSTR(in), -1, NULL, 0, NULL, NULL); - stra = mshtml_alloc(len); + stra = heap_alloc(len); WideCharToMultiByte(CP_ACP, 0, V_BSTR(in), -1, stra, -1, NULL, NULL); set_ns_fontname(This->nscontainer, stra); - mshtml_free(stra); + heap_free(stra); update_doc(This, UPDATE_UI); } @@ -599,12 +599,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, nsICommandParams_Release(nsparam); len = MultiByteToWideChar(CP_ACP, 0, stra, -1, NULL, 0); - strw = mshtml_alloc(len*sizeof(WCHAR)); + strw = heap_alloc(len*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, stra, -1, strw, -1); nsfree(stra); V_BSTR(out) = SysAllocString(strw); - mshtml_free(strw); + heap_free(strw); } return S_OK; diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 61ab6cdd028..41b71e77a60 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -484,7 +484,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = { HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem) { - HTMLAnchorElement *ret = mshtml_alloc(sizeof(HTMLAnchorElement)); + HTMLAnchorElement *ret = heap_alloc(sizeof(HTMLAnchorElement)); HTMLElement_Init(&ret->element); diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index c3a930c641c..ad9a0108a62 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -490,7 +490,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = { HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem) { - HTMLBodyElement *ret = mshtml_alloc(sizeof(HTMLBodyElement)); + HTMLBodyElement *ret = heap_alloc(sizeof(HTMLBodyElement)); nsresult nsres; TRACE("(%p)->(%p)\n", ret, nselem); diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index f3ca63babaf..eb4abe0e84e 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -194,7 +194,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface) if(This->nscontainer) NSContainer_Release(This->nscontainer); - mshtml_free(This); + heap_free(This); UNLOCK_MODULE(); } @@ -1176,7 +1176,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject) TRACE("(%p %s %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject); - ret = mshtml_alloc(sizeof(HTMLDocument)); + ret = heap_alloc(sizeof(HTMLDocument)); ret->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl; ret->ref = 0; ret->nscontainer = NULL; @@ -1191,7 +1191,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject) hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject); if(FAILED(hres)) { - mshtml_free(ret); + heap_free(ret); return hres; } diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index e1601755975..72dca256a4d 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -50,7 +50,7 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem) { if(buf->len == buf->size) { buf->size <<= 1; - buf->buf = mshtml_realloc(buf->buf, buf->size*sizeof(HTMLElement**)); + buf->buf = heap_realloc(buf->buf, buf->size*sizeof(HTMLElement**)); } buf->buf[buf->len++] = elem; @@ -59,10 +59,10 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem) static void elem_vector_normalize(elem_vector *buf) { if(!buf->len) { - mshtml_free(buf->buf); + heap_free(buf->buf); buf->buf = NULL; }else if(buf->size > buf->len) { - buf->buf = mshtml_realloc(buf->buf, buf->len*sizeof(HTMLElement**)); + buf->buf = heap_realloc(buf->buf, buf->len*sizeof(HTMLElement**)); } buf->size = buf->len; @@ -1059,7 +1059,7 @@ static void create_child_list(HTMLDocument *doc, HTMLElement *elem, elem_vector return; buf->size = list_len; - buf->buf = mshtml_alloc(buf->size*sizeof(HTMLElement**)); + buf->buf = heap_alloc(buf->size*sizeof(HTMLElement**)); for(i=0; i(%p)\n", This, p); - buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement**)); + buf.buf = heap_alloc(buf.size*sizeof(HTMLElement**)); create_all_list(This->node.doc, &This->node, &buf); elem_vector_normalize(&buf); @@ -1336,7 +1336,7 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode) ret = HTMLTextAreaElement_Create(nselem); if(!ret) { - ret = mshtml_alloc(sizeof(HTMLElement)); + ret = heap_alloc(sizeof(HTMLElement)); HTMLElement_Init(ret); } @@ -1407,8 +1407,8 @@ static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface) if(!ref) { IUnknown_Release(This->ref_unk); - mshtml_free(This->elems); - mshtml_free(This); + heap_free(This->elems); + heap_free(This); } return ref; @@ -1563,7 +1563,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface, }else { elem_vector buf = {NULL, 0, 8}; - buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement*)); + buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*)); for(i=0; ilen; i++) { if(is_elem_name(This->elems[i], V_BSTR(&name))) @@ -1579,7 +1579,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface, IDispatch_AddRef(*pdisp); } - mshtml_free(buf.buf); + heap_free(buf.buf); } return S_OK; @@ -1606,7 +1606,7 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface, TRACE("(%p)->(%s %p)\n", This, debugstr_w(V_BSTR(&tagName)), pdisp); - buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement*)); + buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*)); nsAString_Init(&tag_str, NULL); @@ -1653,7 +1653,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node) { elem_vector buf = {NULL, 0, 8}; - buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement**)); + buf.buf = heap_alloc(buf.size*sizeof(HTMLElement**)); elem_vector_add(&buf, HTMLELEM_NODE_THIS(node)); create_all_list(node->doc, node, &buf); @@ -1665,7 +1665,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node) static IHTMLElementCollection *HTMLElementCollection_Create(IUnknown *ref_unk, HTMLElement **elems, DWORD len) { - HTMLElementCollection *ret = mshtml_alloc(sizeof(HTMLElementCollection)); + HTMLElementCollection *ret = heap_alloc(sizeof(HTMLElementCollection)); ret->lpHTMLElementCollectionVtbl = &HTMLElementCollectionVtbl; ret->ref = 1; diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 7f6c8c644d3..46ebb53fa3c 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1059,7 +1059,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = { HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem) { - HTMLInputElement *ret = mshtml_alloc(sizeof(HTMLInputElement)); + HTMLInputElement *ret = heap_alloc(sizeof(HTMLInputElement)); nsresult nsres; HTMLElement_Init(&ret->element); diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 8eb907a2fb9..84ce11007a1 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -66,7 +66,7 @@ static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface) if(!ref) { This->vtbl->destructor(This); - mshtml_free(This); + heap_free(This); } return ref; @@ -354,7 +354,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode) ret = &HTMLElement_Create(nsnode)->node; break; default: - ret = mshtml_alloc(sizeof(HTMLDOMNode)); + ret = heap_alloc(sizeof(HTMLDOMNode)); ret->vtbl = &HTMLDOMNodeImplVtbl; } diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 579725ea48f..648ffa2582f 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -337,7 +337,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = { HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem) { - HTMLOptionElement *ret = mshtml_alloc(sizeof(HTMLOptionElement)); + HTMLOptionElement *ret = heap_alloc(sizeof(HTMLOptionElement)); nsresult nsres; HTMLElement_Init(&ret->element); @@ -399,7 +399,7 @@ static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory * TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -512,7 +512,7 @@ HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument *doc) { HTMLOptionElementFactory *ret; - ret = mshtml_alloc(sizeof(HTMLOptionElementFactory)); + ret = heap_alloc(sizeof(HTMLOptionElementFactory)); ret->lpHTMLOptionElementFactoryVtbl = &HTMLOptionElementFactoryVtbl; ret->ref = 1; diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 6395bc34bbc..e1a0d10da40 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -426,7 +426,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = { HTMLElement *HTMLSelectElement_Create(nsIDOMHTMLElement *nselem) { - HTMLSelectElement *ret = mshtml_alloc(sizeof(HTMLSelectElement)); + HTMLSelectElement *ret = heap_alloc(sizeof(HTMLSelectElement)); nsresult nsres; HTMLElement_Init(&ret->element); diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index b5ffbf63dd4..4ac853a0ef1 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -193,7 +193,7 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -1736,7 +1736,7 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = { IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle) { - HTMLStyle *ret = mshtml_alloc(sizeof(HTMLStyle)); + HTMLStyle *ret = heap_alloc(sizeof(HTMLStyle)); ret->lpHTMLStyleVtbl = &HTMLStyleVtbl; ret->ref = 1; diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index 30c25cee571..bc42ee40095 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -103,7 +103,7 @@ static ULONG WINAPI HTMLStyleSheetsCollection_Release(IHTMLStyleSheetsCollection TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -221,7 +221,7 @@ static const IHTMLStyleSheetsCollectionVtbl HTMLStyleSheetsCollectionVtbl = { IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetList *nslist) { - HTMLStyleSheetsCollection *ret = mshtml_alloc(sizeof(HTMLStyleSheetsCollection)); + HTMLStyleSheetsCollection *ret = heap_alloc(sizeof(HTMLStyleSheetsCollection)); ret->lpHTMLStyleSheetsCollectionVtbl = &HTMLStyleSheetsCollectionVtbl; ret->ref = 1; @@ -279,7 +279,7 @@ static ULONG WINAPI HTMLStyleSheet_Release(IHTMLStyleSheet *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -505,7 +505,7 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = { IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet *nsstylesheet) { - HTMLStyleSheet *ret = mshtml_alloc(sizeof(HTMLStyleSheet)); + HTMLStyleSheet *ret = heap_alloc(sizeof(HTMLStyleSheet)); nsresult nsres; ret->lpHTMLStyleSheetVtbl = &HTMLStyleSheetVtbl; diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index 234fa7ef1a5..ffef38af336 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -550,7 +550,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = { HTMLElement *HTMLTable_Create(nsIDOMHTMLElement *nselem) { - HTMLTable *ret = mshtml_alloc(sizeof(HTMLTable)); + HTMLTable *ret = heap_alloc(sizeof(HTMLTable)); HTMLElement_Init(&ret->element); diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index fbb7df8f9b6..585650f125c 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -406,7 +406,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { HTMLElement *HTMLTextAreaElement_Create(nsIDOMHTMLElement *nselem) { - HTMLTextAreaElement *ret = mshtml_alloc(sizeof(HTMLTextAreaElement)); + HTMLTextAreaElement *ret = heap_alloc(sizeof(HTMLTextAreaElement)); nsresult nsres; HTMLElement_Init(&ret->element); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index fee2297e926..a24480b938d 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -89,7 +89,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface) if(!ref) { list_remove(&This->entry); - mshtml_free(This); + heap_free(This); } return ref; @@ -775,12 +775,12 @@ static void astr_to_nswstr(const char *str, nsAString *nsstr) int len; len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - wstr = mshtml_alloc(len*sizeof(WCHAR)); + wstr = heap_alloc(len*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, str, -1, wstr, len); nsAString_Init(nsstr, wstr); - mshtml_free(wstr); + heap_free(wstr); } static nsresult call_js_func(nsIScriptContainer *script_container, nsISupports *target, @@ -867,7 +867,7 @@ void setup_nswindow(HTMLWindow *This) HTMLWindow *HTMLWindow_Create(HTMLDocument *doc) { - HTMLWindow *ret = mshtml_alloc(sizeof(HTMLWindow)); + HTMLWindow *ret = heap_alloc(sizeof(HTMLWindow)); ret->lpHTMLWindow2Vtbl = &HTMLWindow2Vtbl; ret->ref = 1; diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 4acef19dcd5..731af6059fe 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -66,7 +66,7 @@ static void clean_up(void) if(tmp_file_name) { DeleteFileW(tmp_file_name); - mshtml_free(tmp_file_name); + heap_free(tmp_file_name); tmp_file_name = NULL; } @@ -112,7 +112,7 @@ static void set_registry(LPCSTR install_dir) } len = MultiByteToWideChar(CP_ACP, 0, install_dir, -1, NULL, 0)-1; - gecko_path = mshtml_alloc((len+1)*sizeof(WCHAR)+sizeof(wszWineGecko)); + gecko_path = heap_alloc((len+1)*sizeof(WCHAR)+sizeof(wszWineGecko)); MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, (len+1)*sizeof(WCHAR)); if (len && gecko_path[len-1] != '\\') @@ -123,7 +123,7 @@ static void set_registry(LPCSTR install_dir) size = len*sizeof(WCHAR)+sizeof(wszWineGecko); res = RegSetValueExW(hkey, wszGeckoPath, 0, REG_SZ, (LPVOID)gecko_path, len*sizeof(WCHAR)+sizeof(wszWineGecko)); - mshtml_free(gecko_path); + heap_free(gecko_path); RegCloseKey(hkey); if(res != ERROR_SUCCESS) ERR("Failed to set GeckoPath value: %08x\n", res); @@ -161,13 +161,13 @@ static BOOL install_cab(LPCWSTR file_name) pExtractFilesA = (typeof(ExtractFilesA)*)GetProcAddress(advpack, "ExtractFiles"); len = WideCharToMultiByte(CP_ACP, 0, file_name, -1, NULL, 0, NULL, NULL); - file_name_a = mshtml_alloc(len); + file_name_a = heap_alloc(len); WideCharToMultiByte(CP_ACP, 0, file_name, -1, file_name_a, -1, NULL, NULL); /* FIXME: Use unicode version (not yet implemented) */ hres = pExtractFilesA(file_name_a, install_dir, 0, NULL, NULL, 0); FreeLibrary(advpack); - mshtml_free(file_name_a); + heap_free(file_name_a); if(FAILED(hres)) { ERR("Could not extract package: %08x\n", hres); clean_up(); @@ -213,7 +213,7 @@ static BOOL install_from_unix_file(const char *file_name) ret = install_cab(dos_file_name); - mshtml_free(dos_file_name); + heap_free(dos_file_name); return ret; } @@ -229,10 +229,10 @@ static BOOL install_from_registered_dir(void) if(res != ERROR_SUCCESS) return FALSE; - file_name = mshtml_alloc(size+sizeof(GECKO_FILE_NAME)); + file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME)); res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size); if(res == ERROR_MORE_DATA) { - file_name = mshtml_realloc(file_name, size+sizeof(GECKO_FILE_NAME)); + file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME)); res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size); } RegCloseKey(hkey); @@ -245,7 +245,7 @@ static BOOL install_from_registered_dir(void) ret = install_from_unix_file(file_name); - mshtml_free(file_name); + heap_free(file_name); return ret; } @@ -266,14 +266,14 @@ static BOOL install_from_default_dir(void) len = strlen(data_dir); len2 = strlen(subdir); - file_name = mshtml_alloc(len+len2+sizeof(GECKO_FILE_NAME)); + file_name = heap_alloc(len+len2+sizeof(GECKO_FILE_NAME)); memcpy(file_name, data_dir, len); memcpy(file_name+len, subdir, len2); memcpy(file_name+len+len2, GECKO_FILE_NAME, sizeof(GECKO_FILE_NAME)); ret = install_from_unix_file(file_name); - mshtml_free(file_name); + heap_free(file_name); return ret; } @@ -307,7 +307,7 @@ static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface, GetTempPathW(sizeof(tmp_dir)/sizeof(WCHAR), tmp_dir); - tmp_file_name = mshtml_alloc(MAX_PATH*sizeof(WCHAR)); + tmp_file_name = heap_alloc(MAX_PATH*sizeof(WCHAR)); GetTempFileNameW(tmp_dir, NULL, 0, tmp_file_name); TRACE("creating temp file %s\n", debugstr_w(tmp_file_name)); @@ -433,12 +433,12 @@ static LPWSTR get_url(void) if(res != ERROR_SUCCESS) return NULL; - url = mshtml_alloc(size); + url = heap_alloc(size); res = RegQueryValueExW(hkey, wszGeckoUrl, NULL, &type, (LPBYTE)url, &size); RegCloseKey(hkey); if(res != ERROR_SUCCESS || type != REG_SZ) { - mshtml_free(url); + heap_free(url); return NULL; } @@ -459,7 +459,7 @@ static DWORD WINAPI download_proc(PVOID arg) HRESULT hres; CreateURLMoniker(NULL, url, &mon); - mshtml_free(url); + heap_free(url); url = NULL; CreateAsyncBindCtx(0, &InstallCallback, 0, &bctx); diff --git a/dlls/mshtml/loadopts.c b/dlls/mshtml/loadopts.c index 646394ef981..8648f16b7f9 100644 --- a/dlls/mshtml/loadopts.c +++ b/dlls/mshtml/loadopts.c @@ -106,11 +106,11 @@ static ULONG WINAPI HtmlLoadOptions_Release(IHtmlLoadOptions *iface) last = iter; iter = iter->next; - mshtml_free(last->buffer); - mshtml_free(last); + heap_free(last->buffer); + heap_free(last); } - mshtml_free(This); + heap_free(This); } return ref; @@ -159,13 +159,13 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d } if(!iter) { - iter = mshtml_alloc(sizeof(load_opt)); + iter = heap_alloc(sizeof(load_opt)); iter->next = This->opts; This->opts = iter; iter->option = dwOption; }else { - mshtml_free(iter->buffer); + heap_free(iter->buffer); } if(!cbBuf) { @@ -176,7 +176,7 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d } iter->size = cbBuf; - iter->buffer = mshtml_alloc(cbBuf); + iter->buffer = heap_alloc(cbBuf); memcpy(iter->buffer, pBuffer, iter->size); return S_OK; @@ -199,7 +199,7 @@ HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void** ppv) TRACE("(%p %s %p)\n", pUnkOuter, debugstr_guid(riid), ppv); - ret = mshtml_alloc(sizeof(HTMLLoadOptions)); + ret = heap_alloc(sizeof(HTMLLoadOptions)); ret->lpHtmlLoadOptionsVtbl = &HtmlLoadOptionsVtbl; ret->ref = 1; diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 898ff14a379..74fba4c8e39 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -103,7 +103,7 @@ static void thread_detach(void) if(thread_data->thread_hwnd) DestroyWindow(thread_data->thread_hwnd); - mshtml_free(thread_data); + heap_free(thread_data); } static void process_detach(void) @@ -192,7 +192,7 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) TRACE("(%p) ref = %u\n", This, ref); if(!ref) { - mshtml_free(This); + heap_free(This); UNLOCK_MODULE(); } @@ -228,7 +228,7 @@ static const IClassFactoryVtbl HTMLClassFactoryVtbl = { static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc fnCreateInstance) { - ClassFactory *ret = mshtml_alloc(sizeof(ClassFactory)); + ClassFactory *ret = heap_alloc(sizeof(ClassFactory)); HRESULT hres; ret->lpVtbl = &HTMLClassFactoryVtbl; @@ -239,7 +239,7 @@ static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc f if(SUCCEEDED(hres)) { LOCK_MODULE(); }else { - mshtml_free(ret); + heap_free(ret); *ppv = NULL; } return hres; @@ -416,7 +416,7 @@ static HRESULT register_server(BOOL do_register) INF_SET_ID(LIBID_MSHTML); for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) { - pse[i].pszValue = mshtml_alloc(39); + pse[i].pszValue = heap_alloc(39); sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0], clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4], @@ -432,7 +432,7 @@ static HRESULT register_server(BOOL do_register) hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable); for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) - mshtml_free(pse[i].pszValue); + heap_free(pse[i].pszValue); if(FAILED(hres)) { ERR("RegInstall failed: %08x\n", hres); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 8d45752c165..4e76924b972 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -541,22 +541,22 @@ extern LONG module_ref; /* memory allocation functions */ -static inline void *mshtml_alloc(size_t len) +static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); } -static inline void *mshtml_alloc_zero(size_t len) +static inline void *heap_alloc_zero(size_t len) { return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); } -static inline void *mshtml_realloc(void *mem, size_t len) +static inline void *heap_realloc(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), 0, mem, len); } -static inline BOOL mshtml_free(void *mem) +static inline BOOL heap_free(void *mem) { return HeapFree(GetProcessHeap(), 0, mem); } diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 96369cbd3f4..29a3798ef31 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -88,7 +88,7 @@ static nsrefcnt NSAPI nsInputStream_Release(nsIInputStream *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -176,7 +176,7 @@ static const nsIInputStreamVtbl nsInputStreamVtbl = { static nsProtocolStream *create_nsprotocol_stream(void) { - nsProtocolStream *ret = mshtml_alloc(sizeof(nsProtocolStream)); + nsProtocolStream *ret = heap_alloc(sizeof(nsProtocolStream)); ret->lpInputStreamVtbl = &nsInputStreamVtbl; ret->ref = 1; @@ -212,7 +212,7 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream) break; if(!This->readed && This->nsstream->buf_size >= 2 && *(WORD*)This->nsstream->buf == 0xfeff) { - This->nschannel->charset = mshtml_alloc(sizeof(UTF16_STR)); + This->nschannel->charset = heap_alloc(sizeof(UTF16_STR)); memcpy(This->nschannel->charset, UTF16_STR, sizeof(UTF16_STR)); } @@ -330,8 +330,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) if(This->binding) IBinding_Release(This->binding); list_remove(&This->entry); - mshtml_free(This->headers); - mshtml_free(This); + heap_free(This->headers); + heap_free(This); } return ref; @@ -383,10 +383,10 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, if(!This->nschannel) return S_OK; - mshtml_free(This->nschannel->content); + heap_free(This->nschannel->content); len = WideCharToMultiByte(CP_ACP, 0, szStatusText, -1, NULL, 0, NULL, NULL); - This->nschannel->content = mshtml_alloc(len*sizeof(WCHAR)); + This->nschannel->content = heap_alloc(len*sizeof(WCHAR)); WideCharToMultiByte(CP_ACP, 0, szStatusText, -1, This->nschannel->content, -1, NULL, NULL); } } @@ -425,7 +425,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac return S_OK; if(This->doc && This->doc->bscallback == This && !This->doc->nscontainer) { - task_t *task = mshtml_alloc(sizeof(task_t)); + task_t *task = heap_alloc(sizeof(task_t)); task->doc = This->doc; task->task_id = TASK_PARSECOMPLETE; @@ -662,7 +662,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { BSCallback *create_bscallback(IMoniker *mon) { - BSCallback *ret = mshtml_alloc(sizeof(BSCallback)); + BSCallback *ret = heap_alloc(sizeof(BSCallback)); ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl; ret->lpServiceProviderVtbl = &ServiceProviderVtbl; @@ -750,9 +750,9 @@ static void parse_post_data(nsIInputStream *post_data_stream, LPWSTR *headers_re len = MultiByteToWideChar(CP_ACP, 0, ptr2, ptr-ptr2, NULL, 0); if(headers) - headers = mshtml_realloc(headers,(headers_len+len+1)*sizeof(WCHAR)); + headers = heap_realloc(headers,(headers_len+len+1)*sizeof(WCHAR)); else - headers = mshtml_alloc((len+1)*sizeof(WCHAR)); + headers = heap_alloc((len+1)*sizeof(WCHAR)); len = MultiByteToWideChar(CP_ACP, 0, ptr2, ptr-ptr2, headers+headers_len, -1); headers_len += len; @@ -895,7 +895,7 @@ HRESULT load_stream(BSCallback *bscallback, IStream *stream) add_nsrequest(bscallback); if(bscallback->nschannel) { - bscallback->nschannel->content = mshtml_alloc(sizeof(text_html)); + bscallback->nschannel->content = heap_alloc(sizeof(text_html)); memcpy(bscallback->nschannel->content, text_html, sizeof(text_html)); } diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 00b98b2a09d..fc8ccbfb4b2 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -874,7 +874,7 @@ static nsrefcnt NSAPI nsWebBrowserChrome_Release(nsIWebBrowserChrome *iface) if(!ref) { if(This->parent) nsIWebBrowserChrome_Release(NSWBCHROME(This->parent)); - mshtml_free(This); + heap_free(This); } return ref; @@ -1558,7 +1558,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent) if(!load_gecko(FALSE)) return NULL; - ret = mshtml_alloc(sizeof(NSContainer)); + ret = heap_alloc(sizeof(NSContainer)); ret->lpWebBrowserChromeVtbl = &nsWebBrowserChromeVtbl; ret->lpContextMenuListenerVtbl = &nsContextMenuListenerVtbl; diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 3c532f0f9b3..ccec4242aa1 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -146,7 +146,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event if(This->doc->usermode == EDITMODE) handle_edit_load(This->doc); - task = mshtml_alloc(sizeof(task_t)); + task = heap_alloc(sizeof(task_t)); task->doc = This->doc; task->task_id = TASK_PARSECOMPLETE; diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 22b30e5fe11..72ad814a1cb 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -204,9 +204,9 @@ static nsrefcnt NSAPI nsChannel_Release(nsIHttpChannel *iface) nsIInterfaceRequestor_Release(This->notif_callback); if(This->original_uri) nsIURI_Release(This->original_uri); - mshtml_free(This->content); - mshtml_free(This->charset); - mshtml_free(This); + heap_free(This->content); + heap_free(This->charset); + heap_free(This); } return ref; @@ -735,7 +735,7 @@ static nsresult async_open(nsChannel *This, NSContainer *container, nsIStreamLis bscallback->nscontext = context; } - task = mshtml_alloc(sizeof(task_t)); + task = heap_alloc(sizeof(task_t)); task->doc = container->doc; task->task_id = TASK_START_BINDING; @@ -1190,8 +1190,8 @@ static nsrefcnt NSAPI nsURI_Release(nsIWineURI *iface) nsIWebBrowserChrome_Release(NSWBCHROME(This->container)); if(This->uri) nsIURI_Release(This->uri); - mshtml_free(This->wine_url); - mshtml_free(This); + heap_free(This->wine_url); + heap_free(This); } return ref; @@ -1655,11 +1655,11 @@ static nsresult NSAPI nsURI_SetWineURL(nsIWineURI *iface, LPCWSTR aURL) TRACE("(%p)->(%s)\n", This, debugstr_w(aURL)); - mshtml_free(This->wine_url); + heap_free(This->wine_url); if(aURL) { int len = strlenW(aURL)+1; - This->wine_url = mshtml_alloc(len*sizeof(WCHAR)); + This->wine_url = heap_alloc(len*sizeof(WCHAR)); memcpy(This->wine_url, aURL, len*sizeof(WCHAR)); /* FIXME: Always use wine url */ @@ -1717,7 +1717,7 @@ static const nsIWineURIVtbl nsWineURIVtbl = { static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIWineURI **_retval) { - nsURI *ret = mshtml_alloc(sizeof(nsURI)); + nsURI *ret = heap_alloc(sizeof(nsURI)); ret->lpWineURIVtbl = &nsWineURIVtbl; ret->ref = 1; @@ -1794,7 +1794,7 @@ static nsrefcnt NSAPI nsProtocolHandler_Release(nsIProtocolHandler *iface) if(!ref) { if(This->nshandler) nsIProtocolHandler_Release(This->nshandler); - mshtml_free(This); + heap_free(This); } return ref; @@ -1887,7 +1887,7 @@ static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl = { static nsIProtocolHandler *create_protocol_handler(nsIProtocolHandler *nshandler) { - nsProtocolHandler *ret = mshtml_alloc(sizeof(nsProtocolHandler)); + nsProtocolHandler *ret = heap_alloc(sizeof(nsProtocolHandler)); ret->lpProtocolHandlerVtbl = &nsProtocolHandlerVtbl; ret->ref = 1; @@ -2092,7 +2092,7 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI return channel ? NS_OK : NS_ERROR_UNEXPECTED; } - ret = mshtml_alloc(sizeof(nsChannel)); + ret = heap_alloc(sizeof(nsChannel)); ret->lpHttpChannelVtbl = &nsChannelVtbl; ret->lpUploadChannelVtbl = &nsUploadChannelVtbl; diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 8a4ad254d73..d8087146d6d 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -136,7 +136,7 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx) static const char content_length[] = "Content-Length: %u\r\n\r\n"; - data = mshtml_alloc(headers_len+post_len+sizeof(content_length)+8); + data = heap_alloc(headers_len+post_len+sizeof(content_length)+8); if(headers_len) { WideCharToMultiByte(CP_ACP, 0, headers, -1, data, -1, NULL, NULL); @@ -281,7 +281,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO bscallback = create_bscallback(mon); if(This->frame) { - task = mshtml_alloc(sizeof(task_t)); + task = heap_alloc(sizeof(task_t)); task->doc = This; task->task_id = TASK_SETPROGRESS; @@ -290,7 +290,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO push_task(task); } - task = mshtml_alloc(sizeof(task_t)); + task = heap_alloc(sizeof(task_t)); task->doc = This; task->task_id = TASK_SETDOWNLOADSTATE; @@ -366,7 +366,7 @@ static HRESULT get_doc_string(HTMLDocument *This, char **str, DWORD *len) TRACE("%s\n", debugstr_w(strw)); *len = WideCharToMultiByte(CP_ACP, 0, strw, -1, NULL, 0, NULL, NULL); - *str = mshtml_alloc(*len); + *str = heap_alloc(*len); WideCharToMultiByte(CP_ACP, 0, strw, -1, *str, *len, NULL, NULL); nsAString_Finish(&nsstr); @@ -700,7 +700,7 @@ static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM if(FAILED(hres)) FIXME("Write failed: %08x\n", hres); - mshtml_free(str); + heap_free(str); return S_OK; } diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index c87f42e61f6..e70e78e9641 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -213,8 +213,8 @@ static ULONG WINAPI AboutProtocol_Release(IInternetProtocol *iface) TRACE("(%p) ref=%x\n", iface, ref); if(!ref) { - mshtml_free(This->data); - mshtml_free(This); + heap_free(This->data); + heap_free(This); UNLOCK_MODULE(); } @@ -259,7 +259,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr This->data_len = sizeof(html_begin)+sizeof(html_end)-sizeof(WCHAR) + (text ? strlenW(text)*sizeof(WCHAR) : 0); - This->data = mshtml_alloc(This->data_len); + This->data = heap_alloc(This->data_len); memcpy(This->data, html_begin, sizeof(html_begin)); if(text) @@ -387,7 +387,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface, TRACE("(%p)->(%p %s %p)\n", iface, pUnkOuter, debugstr_guid(riid), ppv); - ret = mshtml_alloc(sizeof(AboutProtocol)); + ret = heap_alloc(sizeof(AboutProtocol)); ret->lpInternetProtocolVtbl = &AboutProtocolVtbl; ret->ref = 0; @@ -409,7 +409,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface, if(SUCCEEDED(hres)) LOCK_MODULE(); else - mshtml_free(ret); + heap_free(ret); return hres; } @@ -542,8 +542,8 @@ static ULONG WINAPI ResProtocol_Release(IInternetProtocol *iface) TRACE("(%p) ref=%x\n", iface, ref); if(!ref) { - mshtml_free(This->data); - mshtml_free(This); + heap_free(This->data); + heap_free(This); UNLOCK_MODULE(); } @@ -573,11 +573,11 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, ReleaseBindInfo(&bindinfo); len = strlenW(szUrl)+16; - url = mshtml_alloc(len*sizeof(WCHAR)); + url = heap_alloc(len*sizeof(WCHAR)); hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0); if(FAILED(hres)) { WARN("CoInternetParseUrl failed: %08x\n", hres); - mshtml_free(url); + heap_free(url); IInternetProtocolSink_ReportResult(pOIProtSink, hres, 0, NULL); return hres; } @@ -585,7 +585,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, if(len < sizeof(wszRes)/sizeof(wszRes[0]) || memcmp(url, wszRes, sizeof(wszRes))) { WARN("Wrong protocol of url: %s\n", debugstr_w(url)); IInternetProtocolSink_ReportResult(pOIProtSink, E_INVALIDARG, 0, NULL); - mshtml_free(url); + heap_free(url); return E_INVALIDARG; } @@ -593,7 +593,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, if(!(url_file = strrchrW(url_dll, '/'))) { WARN("wrong url: %s\n", debugstr_w(url)); IInternetProtocolSink_ReportResult(pOIProtSink, MK_E_SYNTAX, 0, NULL); - mshtml_free(url); + heap_free(url); return MK_E_SYNTAX; } @@ -602,7 +602,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, if(!hdll) { WARN("Could not open dll: %s\n", debugstr_w(url_dll)); IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - mshtml_free(url); + heap_free(url); return HRESULT_FROM_WIN32(GetLastError()); } @@ -617,25 +617,25 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, WARN("Could not find resource\n"); IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - mshtml_free(url); + heap_free(url); return HRESULT_FROM_WIN32(GetLastError()); } } if(This->data) { WARN("data already loaded\n"); - mshtml_free(This->data); + heap_free(This->data); } This->data_len = SizeofResource(hdll, src); - This->data = mshtml_alloc(This->data_len); + This->data = heap_alloc(This->data_len); memcpy(This->data, LoadResource(hdll, src), This->data_len); This->cur = 0; FreeLibrary(hdll); hres = FindMimeFromData(NULL, url_file, NULL, 0, NULL, 0, &mime, 0); - mshtml_free(url); + heap_free(url); if(SUCCEEDED(hres)) { IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, mime); CoTaskMemFree(mime); @@ -763,7 +763,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU TRACE("(%p)->(%p %s %p)\n", iface, pUnkOuter, debugstr_guid(riid), ppv); - ret = mshtml_alloc(sizeof(ResProtocol)); + ret = heap_alloc(sizeof(ResProtocol)); ret->lpInternetProtocolVtbl = &ResProtocolVtbl; ret->ref = 0; ret->data = NULL; @@ -784,7 +784,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU if(SUCCEEDED(hres)) LOCK_MODULE(); else - mshtml_free(ret); + heap_free(ret); return hres; } diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index df2d6353b7d..7de8adf1ffb 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -100,7 +100,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface) nsISelection_Release(This->nsselection); if(This->doc) list_remove(&This->entry); - mshtml_free(This); + heap_free(This); } return ref; @@ -243,7 +243,7 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = { IHTMLSelectionObject *HTMLSelectionObject_Create(HTMLDocument *doc, nsISelection *nsselection) { - HTMLSelectionObject *ret = mshtml_alloc(sizeof(HTMLSelectionObject)); + HTMLSelectionObject *ret = heap_alloc(sizeof(HTMLSelectionObject)); ret->lpHTMLSelectionObjectVtbl = &HTMLSelectionObjectVtbl; ret->ref = 1; diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c index d69c77827f8..66fa8b69522 100644 --- a/dlls/mshtml/service.c +++ b/dlls/mshtml/service.c @@ -81,7 +81,7 @@ static ULONG WINAPI OleUndoManager_Release(IOleUndoManager *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) - mshtml_free(This); + heap_free(This); return ref; } @@ -195,7 +195,7 @@ static const IOleUndoManagerVtbl OleUndoManagerVtbl = { static IOleUndoManager *create_undomgr(void) { - UndoManager *ret = mshtml_alloc(sizeof(UndoManager)); + UndoManager *ret = heap_alloc(sizeof(UndoManager)); ret->lpOleUndoManagerVtbl = &OleUndoManagerVtbl; ret->ref = 1; diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c index 3a94cbca343..e612d819023 100644 --- a/dlls/mshtml/task.c +++ b/dlls/mshtml/task.c @@ -82,7 +82,7 @@ void remove_doc_tasks(const HTMLDocument *doc) while(iter->next && iter->next->doc == doc) { tmp = iter->next; iter->next = tmp->next; - mshtml_free(tmp); + heap_free(tmp); } if(!iter->next) @@ -248,7 +248,7 @@ static LRESULT WINAPI hidden_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa break; process_task(task); - mshtml_free(task); + heap_free(task); } return 0; @@ -305,7 +305,7 @@ thread_data_t *get_thread_data(BOOL create) thread_data = TlsGetValue(mshtml_tls); if(!thread_data && create) { - thread_data = mshtml_alloc_zero(sizeof(thread_data_t)); + thread_data = heap_alloc_zero(sizeof(thread_data_t)); TlsSetValue(mshtml_tls, thread_data); } diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index 1d8d2cb65f8..7d046bb2c46 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -160,20 +160,20 @@ static inline void wstrbuf_init(wstrbuf_t *buf) { buf->len = 0; buf->size = 16; - buf->buf = mshtml_alloc(buf->size * sizeof(WCHAR)); + buf->buf = heap_alloc(buf->size * sizeof(WCHAR)); *buf->buf = 0; } static inline void wstrbuf_finish(wstrbuf_t *buf) { - mshtml_free(buf->buf); + heap_free(buf->buf); } static void wstrbuf_append_len(wstrbuf_t *buf, LPCWSTR str, int len) { if(buf->len+len >= buf->size) { buf->size = 2*buf->len+len; - buf->buf = mshtml_realloc(buf->buf, buf->size * sizeof(WCHAR)); + buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR)); } memcpy(buf->buf+buf->len, str, len*sizeof(WCHAR)); @@ -195,7 +195,7 @@ static void wstrbuf_append_nodetxt(wstrbuf_t *buf, LPCWSTR str, int len) if(buf->len+len >= buf->size) { buf->size = 2*buf->len+len; - buf->buf = mshtml_realloc(buf->buf, buf->size * sizeof(WCHAR)); + buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR)); } if(buf->len && isspaceW(buf->buf[buf->len-1])) { @@ -979,7 +979,7 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface) nsISelection_Release(This->nsrange); if(This->doc) list_remove(&This->entry); - mshtml_free(This); + heap_free(This); } return ref; @@ -1757,7 +1757,7 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = { IHTMLTxtRange *HTMLTxtRange_Create(HTMLDocument *doc, nsIDOMRange *nsrange) { - HTMLTxtRange *ret = mshtml_alloc(sizeof(HTMLTxtRange)); + HTMLTxtRange *ret = heap_alloc(sizeof(HTMLTxtRange)); ret->lpHTMLTxtRangeVtbl = &HTMLTxtRangeVtbl; ret->lpOleCommandTargetVtbl = &OleCommandTargetVtbl; diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 5872091784e..4c0d0c525e9 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -368,7 +368,7 @@ static LRESULT WINAPI tooltips_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l static void create_tooltips_window(HTMLDocument *This) { - tooltip_data *data = mshtml_alloc(sizeof(*data)); + tooltip_data *data = heap_alloc(sizeof(*data)); This->tooltips_hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, TTS_NOPREFIX | WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT, 10, 10, This->hwnd, NULL, hInst, NULL); -- 2.11.4.GIT