Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c5e53bd6
Commit
c5e53bd6
authored
Mar 13, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Use heap_alloc_zero to allocate DocHost objects.
parent
355b9b66
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
23 deletions
+11
-23
iexplore.c
dlls/shdocvw/iexplore.c
+1
-1
oleobject.c
dlls/shdocvw/oleobject.c
+0
-11
shdocvw.h
dlls/shdocvw/shdocvw.h
+5
-0
webbrowser.c
dlls/shdocvw/webbrowser.c
+5
-11
No files found.
dlls/shdocvw/iexplore.c
View file @
c5e53bd6
...
...
@@ -163,7 +163,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv)
TRACE
(
"(%p %s %p)
\n
"
,
pOuter
,
debugstr_guid
(
riid
),
ppv
);
ret
=
heap_alloc
(
sizeof
(
InternetExplorer
));
ret
=
heap_alloc
_zero
(
sizeof
(
InternetExplorer
));
ret
->
ref
=
0
;
ret
->
doc_host
.
disp
=
(
IDispatch
*
)
WEBBROWSER2
(
ret
);
...
...
dlls/shdocvw/oleobject.c
View file @
c5e53bd6
...
...
@@ -960,17 +960,6 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
This
->
lpOleInPlaceActiveObjectVtbl
=
&
OleInPlaceActiveObjectVtbl
;
This
->
lpOleCommandTargetVtbl
=
&
OleCommandTargetVtbl
;
This
->
client
=
NULL
;
This
->
inplace
=
NULL
;
This
->
container
=
NULL
;
This
->
frame_hwnd
=
NULL
;
This
->
uiwindow
=
NULL
;
This
->
shell_embedding_hwnd
=
NULL
;
memset
(
&
This
->
pos_rect
,
0
,
sizeof
(
RECT
));
memset
(
&
This
->
clip_rect
,
0
,
sizeof
(
RECT
));
memset
(
&
This
->
frameinfo
,
0
,
sizeof
(
OLEINPLACEFRAMEINFO
));
/* Default size is 50x20 pixels, in himetric units */
This
->
extent
.
cx
=
MulDiv
(
50
,
2540
,
dpi_x
);
This
->
extent
.
cy
=
MulDiv
(
20
,
2540
,
dpi_y
);
...
...
dlls/shdocvw/shdocvw.h
View file @
c5e53bd6
...
...
@@ -262,6 +262,11 @@ static inline void *heap_alloc(size_t len)
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
void
*
heap_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
inline
void
*
heap_realloc
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
...
...
dlls/shdocvw/webbrowser.c
View file @
c5e53bd6
...
...
@@ -1115,23 +1115,20 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
TRACE
(
"(%p %s %p) version=%d
\n
"
,
pOuter
,
debugstr_guid
(
riid
),
ppv
,
version
);
ret
=
heap_alloc
(
sizeof
(
WebBrowser
));
ret
=
heap_alloc
_zero
(
sizeof
(
WebBrowser
));
ret
->
lpWebBrowser2Vtbl
=
&
WebBrowser2Vtbl
;
ret
->
lpServiceProviderVtbl
=
&
ServiceProviderVtbl
;
ret
->
ref
=
0
;
ret
->
ref
=
1
;
ret
->
version
=
version
;
DocHost_Init
(
&
ret
->
doc_host
,
(
IDispatch
*
)
WEBBROWSER2
(
ret
));
ret
->
register_browser
=
VARIANT_FALSE
;
ret
->
visible
=
VARIANT_TRUE
;
ret
->
menu_bar
=
VARIANT_TRUE
;
ret
->
address_bar
=
VARIANT_TRUE
;
ret
->
status_bar
=
VARIANT_TRUE
;
ret
->
tool_bar
=
VARIANT_TRUE
;
ret
->
full_screen
=
VARIANT_FALSE
;
ret
->
theater_mode
=
VARIANT_FALSE
;
WebBrowser_OleObject_Init
(
ret
);
WebBrowser_ViewObject_Init
(
ret
);
...
...
@@ -1139,14 +1136,11 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
WebBrowser_ClassInfo_Init
(
ret
);
WebBrowser_HlinkFrame_Init
(
ret
);
SHDOCVW_LockModule
();
hres
=
IWebBrowser_QueryInterface
(
WEBBROWSER
(
ret
),
riid
,
ppv
);
if
(
SUCCEEDED
(
hres
))
{
SHDOCVW_LockModule
();
}
else
{
heap_free
(
ret
);
return
hres
;
}
IWebBrowser2_Release
(
WEBBROWSER
(
ret
));
return
hres
;
}
...
...
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