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
a35513bb
Commit
a35513bb
authored
Oct 30, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Release IDispatchEx dynamic data properly.
parent
4d5b3ddf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
8 deletions
+24
-8
dispex.c
dlls/msxml3/dispex.c
+16
-0
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
node.c
dlls/msxml3/node.c
+2
-4
selection.c
dlls/msxml3/selection.c
+5
-4
No files found.
dlls/msxml3/dispex.c
View file @
a35513bb
...
...
@@ -653,6 +653,22 @@ BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
return
TRUE
;
}
void
release_dispex
(
DispatchEx
*
This
)
{
dynamic_prop_t
*
prop
;
if
(
!
This
->
dynamic_data
)
return
;
for
(
prop
=
This
->
dynamic_data
->
props
;
prop
<
This
->
dynamic_data
->
props
+
This
->
dynamic_data
->
prop_cnt
;
prop
++
)
{
VariantClear
(
&
prop
->
var
);
heap_free
(
prop
->
name
);
}
heap_free
(
This
->
dynamic_data
->
props
);
heap_free
(
This
->
dynamic_data
);
}
void
init_dispex
(
DispatchEx
*
dispex
,
IUnknown
*
outer
,
dispex_static_data_t
*
data
)
{
dispex
->
IDispatchEx_iface
.
lpVtbl
=
&
DispatchExVtbl
;
...
...
dlls/msxml3/msxml_private.h
View file @
a35513bb
...
...
@@ -156,6 +156,7 @@ typedef struct {
extern
HINSTANCE
MSXML_hInstance
DECLSPEC_HIDDEN
;
void
init_dispex
(
DispatchEx
*
,
IUnknown
*
,
dispex_static_data_t
*
)
DECLSPEC_HIDDEN
;
void
release_dispex
(
DispatchEx
*
)
DECLSPEC_HIDDEN
;
BOOL
dispex_query_interface
(
DispatchEx
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
/* memory allocation functions */
...
...
dlls/msxml3/node.c
View file @
a35513bb
...
...
@@ -1110,6 +1110,7 @@ void destroy_xmlnode(xmlnode *This)
{
if
(
This
->
node
)
xmldoc_release
(
This
->
node
->
doc
);
release_dispex
(
&
This
->
dispex
);
}
void
init_xmlnode
(
xmlnode
*
This
,
xmlNodePtr
node
,
IXMLDOMNode
*
node_iface
,
dispex_static_data_t
*
dispex_data
)
...
...
@@ -1121,10 +1122,7 @@ void init_xmlnode(xmlnode *This, xmlNodePtr node, IXMLDOMNode *node_iface, dispe
This
->
iface
=
node_iface
;
This
->
parent
=
NULL
;
if
(
dispex_data
)
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
This
->
iface
,
dispex_data
);
else
This
->
dispex
.
outer
=
NULL
;
init_dispex
(
&
This
->
dispex
,
dispex_data
?
(
IUnknown
*
)
This
->
iface
:
NULL
,
dispex_data
);
}
typedef
struct
{
...
...
dlls/msxml3/selection.c
View file @
a35513bb
...
...
@@ -155,6 +155,7 @@ static ULONG WINAPI domselection_Release(
xmlXPathFreeObject
(
This
->
result
);
xmldoc_release
(
This
->
node
->
doc
);
if
(
This
->
enumvariant
)
IEnumVARIANT_Release
(
This
->
enumvariant
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -756,8 +757,9 @@ HRESULT create_selection(xmlNodePtr node, xmlChar* query, IXMLDOMNodeList **out)
*
out
=
NULL
;
if
(
!
This
||
!
ctxt
||
!
query
)
{
hr
=
E_OUTOFMEMORY
;
goto
cleanup
;
xmlXPathFreeContext
(
ctxt
);
heap_free
(
This
);
return
E_OUTOFMEMORY
;
}
This
->
IXMLDOMSelection_iface
.
lpVtbl
=
&
domselection_vtbl
;
...
...
@@ -765,6 +767,7 @@ HRESULT create_selection(xmlNodePtr node, xmlChar* query, IXMLDOMNodeList **out)
This
->
resultPos
=
0
;
This
->
node
=
node
;
This
->
enumvariant
=
NULL
;
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
&
This
->
IXMLDOMSelection_iface
,
&
domselection_dispex
);
xmldoc_add_ref
(
This
->
node
->
doc
);
ctxt
->
error
=
query_serror
;
...
...
@@ -804,8 +807,6 @@ HRESULT create_selection(xmlNodePtr node, xmlChar* query, IXMLDOMNodeList **out)
goto
cleanup
;
}
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
&
This
->
IXMLDOMSelection_iface
,
&
domselection_dispex
);
*
out
=
(
IXMLDOMNodeList
*
)
&
This
->
IXMLDOMSelection_iface
;
hr
=
S_OK
;
TRACE
(
"found %d matches
\n
"
,
xmlXPathNodeSetGetLength
(
This
->
result
->
nodesetval
));
...
...
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