Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a084d1db
Commit
a084d1db
authored
Dec 05, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.
parent
d457af74
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
140 additions
and
140 deletions
+140
-140
conpoint.c
dlls/mshtml/conpoint.c
+3
-3
editor.c
dlls/mshtml/editor.c
+4
-4
htmlanchor.c
dlls/mshtml/htmlanchor.c
+1
-1
htmlbody.c
dlls/mshtml/htmlbody.c
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+13
-13
htmlinput.c
dlls/mshtml/htmlinput.c
+1
-1
htmlnode.c
dlls/mshtml/htmlnode.c
+2
-2
htmloption.c
dlls/mshtml/htmloption.c
+3
-3
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+2
-2
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+4
-4
htmltable.c
dlls/mshtml/htmltable.c
+1
-1
htmltextarea.c
dlls/mshtml/htmltextarea.c
+1
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+4
-4
install.c
dlls/mshtml/install.c
+15
-15
loadopts.c
dlls/mshtml/loadopts.c
+7
-7
main.c
dlls/mshtml/main.c
+6
-6
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-4
navigate.c
dlls/mshtml/navigate.c
+12
-12
nsembed.c
dlls/mshtml/nsembed.c
+2
-2
nsevents.c
dlls/mshtml/nsevents.c
+1
-1
nsio.c
dlls/mshtml/nsio.c
+12
-12
persist.c
dlls/mshtml/persist.c
+5
-5
protocol.c
dlls/mshtml/protocol.c
+18
-18
selection.c
dlls/mshtml/selection.c
+2
-2
service.c
dlls/mshtml/service.c
+2
-2
task.c
dlls/mshtml/task.c
+3
-3
txtrange.c
dlls/mshtml/txtrange.c
+6
-6
view.c
dlls/mshtml/view.c
+1
-1
No files found.
dlls/mshtml/conpoint.c
View file @
a084d1db
...
...
@@ -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)
...
...
dlls/mshtml/editor.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/htmlanchor.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmlbody.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmldoc.c
View file @
a084d1db
...
...
@@ -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
;
}
...
...
dlls/mshtml/htmlelem.c
View file @
a084d1db
...
...
@@ -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
<
list_len
;
i
++
)
{
nsres
=
nsIDOMNodeList_Item
(
nsnode_list
,
i
,
&
iter
);
...
...
@@ -1129,7 +1129,7 @@ static HRESULT WINAPI HTMLElement_get_all(IHTMLElement *iface, IDispatch **p)
TRACE
(
"(%p)->(%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
;
i
<
This
->
len
;
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
;
...
...
dlls/mshtml/htmlinput.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmlnode.c
View file @
a084d1db
...
...
@@ -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
;
}
...
...
dlls/mshtml/htmloption.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/htmlselect.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmlstyle.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/htmlstylesheet.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/htmltable.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmltextarea.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/htmlwindow.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/install.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/loadopts.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/main.c
View file @
a084d1db
...
...
@@ -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
);
...
...
dlls/mshtml/mshtml_private.h
View file @
a084d1db
...
...
@@ -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
);
}
...
...
dlls/mshtml/navigate.c
View file @
a084d1db
...
...
@@ -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
));
}
...
...
dlls/mshtml/nsembed.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/nsevents.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/nsio.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/persist.c
View file @
a084d1db
...
...
@@ -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
;
}
...
...
dlls/mshtml/protocol.c
View file @
a084d1db
...
...
@@ -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
;
}
...
...
dlls/mshtml/selection.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/service.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/task.c
View file @
a084d1db
...
...
@@ -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
);
}
...
...
dlls/mshtml/txtrange.c
View file @
a084d1db
...
...
@@ -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
;
...
...
dlls/mshtml/view.c
View file @
a084d1db
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment