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
e5affa70
Commit
e5affa70
authored
Feb 26, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Update backing docs refcount in put_documentElement().
parent
01dd81a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
domdoc.c
dlls/msxml3/domdoc.c
+9
-0
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
node.c
dlls/msxml3/node.c
+1
-1
No files found.
dlls/msxml3/domdoc.c
View file @
e5affa70
...
...
@@ -1538,7 +1538,9 @@ static HRESULT WINAPI domdoc_put_documentElement(
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
IXMLDOMNode
*
elementNode
;
xmlNodePtr
oldRoot
;
xmlDocPtr
old_doc
;
xmlnode
*
xmlNode
;
int
refcount
=
0
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
DOMElement
);
...
...
@@ -1554,7 +1556,14 @@ static HRESULT WINAPI domdoc_put_documentElement(
if
(
xmldoc_remove_orphan
(
xmlNode
->
node
->
doc
,
xmlNode
->
node
)
!=
S_OK
)
WARN
(
"%p is not an orphan of %p
\n
"
,
xmlNode
->
node
->
doc
,
xmlNode
->
node
);
old_doc
=
xmlNode
->
node
->
doc
;
if
(
old_doc
!=
get_doc
(
This
))
refcount
=
xmlnode_get_inst_cnt
(
xmlNode
);
/* old root is still orphaned by its document, update refcount from new root */
if
(
refcount
)
xmldoc_add_refs
(
get_doc
(
This
),
refcount
);
oldRoot
=
xmlDocSetRootElement
(
get_doc
(
This
),
xmlNode
->
node
);
if
(
refcount
)
xmldoc_release_refs
(
old_doc
,
refcount
);
IXMLDOMNode_Release
(
elementNode
);
if
(
oldRoot
)
...
...
dlls/msxml3/msxml_private.h
View file @
e5affa70
...
...
@@ -294,6 +294,7 @@ extern LONG xmldoc_add_ref( xmlDocPtr doc ) DECLSPEC_HIDDEN;
extern
LONG
xmldoc_release
(
xmlDocPtr
doc
)
DECLSPEC_HIDDEN
;
extern
LONG
xmldoc_add_refs
(
xmlDocPtr
doc
,
LONG
refs
)
DECLSPEC_HIDDEN
;
extern
LONG
xmldoc_release_refs
(
xmlDocPtr
doc
,
LONG
refs
)
DECLSPEC_HIDDEN
;
extern
int
xmlnode_get_inst_cnt
(
xmlnode
*
node
)
DECLSPEC_HIDDEN
;
extern
HRESULT
xmldoc_add_orphan
(
xmlDocPtr
doc
,
xmlNodePtr
node
)
DECLSPEC_HIDDEN
;
extern
HRESULT
xmldoc_remove_orphan
(
xmlDocPtr
doc
,
xmlNodePtr
node
)
DECLSPEC_HIDDEN
;
extern
void
xmldoc_link_xmldecl
(
xmlDocPtr
doc
,
xmlNodePtr
node
)
DECLSPEC_HIDDEN
;
...
...
dlls/msxml3/node.c
View file @
e5affa70
...
...
@@ -402,7 +402,7 @@ static int node_get_inst_cnt(xmlNodePtr node)
return
ret
;
}
static
int
xmlnode_get_inst_cnt
(
xmlnode
*
node
)
int
xmlnode_get_inst_cnt
(
xmlnode
*
node
)
{
return
node_get_inst_cnt
(
node
->
node
);
}
...
...
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