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
7b7a1879
Commit
7b7a1879
authored
Aug 20, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fix IVBErrorHandler related bugs.
parent
126c0abe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
saxreader.c
dlls/msxml3/saxreader.c
+26
-17
No files found.
dlls/msxml3/saxreader.c
View file @
7b7a1879
...
...
@@ -197,7 +197,8 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr)
xmlStopParser
(
This
->
pParserCtxt
);
This
->
ret
=
hr
;
if
(
This
->
saxreader
->
errorHandler
)
if
((
This
->
vbInterface
&&
This
->
saxreader
->
vberrorHandler
)
||
(
!
This
->
vbInterface
&&
This
->
saxreader
->
errorHandler
))
{
WCHAR
msg
[
1024
];
if
(
!
FormatMessageW
(
FORMAT_MESSAGE_FROM_SYSTEM
,
...
...
@@ -1257,7 +1258,8 @@ void libxmlFatalError(void *ctx, const char *msg, ...)
DWORD
len
;
va_list
args
;
if
(
!
This
->
saxreader
->
errorHandler
)
if
((
This
->
vbInterface
&&
!
This
->
saxreader
->
vberrorHandler
)
||
(
!
This
->
vbInterface
&&
!
This
->
saxreader
->
errorHandler
))
{
xmlStopParser
(
This
->
pParserCtxt
);
This
->
ret
=
E_FAIL
;
...
...
@@ -1272,7 +1274,8 @@ void libxmlFatalError(void *ctx, const char *msg, ...)
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
message
,
-
1
,
NULL
,
0
);
wszError
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
message
,
-
1
,
(
LPWSTR
)
wszError
,
len
);
if
(
wszError
)
MultiByteToWideChar
(
CP_ACP
,
0
,
message
,
-
1
,
(
LPWSTR
)
wszError
,
len
);
if
(
This
->
vbInterface
)
{
...
...
@@ -1773,13 +1776,12 @@ static HRESULT WINAPI internal_getErrorHandler(
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pErrorHandler
);
if
(
pErrorHandler
==
NULL
)
return
E_POINTER
;
if
(
This
->
errorHandler
)
{
if
(
vbInterface
)
IVBSAXErrorHandler_AddRef
(
This
->
vberrorHandler
);
else
ISAXErrorHandler_AddRef
(
This
->
errorHandler
);
}
if
(
vbInterface
&&
This
->
vberrorHandler
)
IVBSAXErrorHandler_AddRef
(
This
->
vberrorHandler
);
else
if
(
!
vbInterface
&&
This
->
errorHandler
)
ISAXErrorHandler_AddRef
(
This
->
errorHandler
);
if
(
vbInterface
)
*
(
IVBSAXErrorHandler
**
)
pErrorHandler
=
This
->
vberrorHandler
;
else
...
...
@@ -1802,13 +1804,12 @@ static HRESULT WINAPI internal_putErrorHandler(
else
ISAXErrorHandler_AddRef
((
ISAXErrorHandler
*
)
errorHandler
);
}
if
(
This
->
errorHandler
)
{
if
(
vbInterface
)
IVBSAXErrorHandler_Release
(
This
->
vberrorHandler
);
else
ISAXErrorHandler_Release
(
This
->
errorHandler
);
}
if
(
vbInterface
&&
This
->
vberrorHandler
)
IVBSAXErrorHandler_Release
(
This
->
vberrorHandler
);
else
if
(
!
vbInterface
&&
This
->
errorHandler
)
ISAXErrorHandler_Release
(
This
->
errorHandler
);
if
(
vbInterface
)
This
->
vberrorHandler
=
errorHandler
;
else
...
...
@@ -2018,9 +2019,15 @@ static ULONG WINAPI saxxmlreader_Release(
if
(
This
->
contentHandler
)
ISAXContentHandler_Release
(
This
->
contentHandler
);
if
(
This
->
vbcontentHandler
)
IVBSAXContentHandler_Release
(
This
->
vbcontentHandler
);
if
(
This
->
errorHandler
)
ISAXErrorHandler_Release
(
This
->
errorHandler
);
if
(
This
->
vberrorHandler
)
IVBSAXErrorHandler_Release
(
This
->
vberrorHandler
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -2528,7 +2535,9 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj)
reader
->
lpSAXXMLReaderVtbl
=
&
isaxreader_vtbl
;
reader
->
ref
=
1
;
reader
->
contentHandler
=
NULL
;
reader
->
vbcontentHandler
=
NULL
;
reader
->
errorHandler
=
NULL
;
reader
->
vberrorHandler
=
NULL
;
memset
(
&
reader
->
sax
,
0
,
sizeof
(
xmlSAXHandler
));
reader
->
sax
.
initialized
=
XML_SAX2_MAGIC
;
...
...
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