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
8277c248
Commit
8277c248
authored
Oct 03, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Store entire EXCEPINFO in script context.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
925e56ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
global.c
dlls/vbscript/global.c
+2
-2
interp.c
dlls/vbscript/interp.c
+10
-2
vbscript.c
dlls/vbscript/vbscript.c
+1
-0
vbscript.h
dlls/vbscript/vbscript.h
+2
-1
No files found.
dlls/vbscript/global.c
View file @
8277c248
...
...
@@ -2477,7 +2477,7 @@ static HRESULT Err_Number(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARI
return
E_NOTIMPL
;
}
hres
=
This
->
desc
->
ctx
->
e
rr_number
;
hres
=
This
->
desc
->
ctx
->
e
i
.
scode
;
return
return_int
(
res
,
HRESULT_FACILITY
(
hres
)
==
FACILITY_VBS
?
HRESULT_CODE
(
hres
)
:
hres
);
}
...
...
@@ -2494,7 +2494,7 @@ static HRESULT Err_Clear(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIA
if
(
!
This
->
desc
)
return
E_UNEXPECTED
;
This
->
desc
->
ctx
->
err_number
=
S_OK
;
clear_ei
(
&
This
->
desc
->
ctx
->
ei
)
;
return
S_OK
;
}
...
...
dlls/vbscript/interp.c
View file @
8277c248
...
...
@@ -247,6 +247,14 @@ static HRESULT add_dynamic_var(exec_ctx_t *ctx, const WCHAR *name,
return
S_OK
;
}
void
clear_ei
(
EXCEPINFO
*
ei
)
{
SysFreeString
(
ei
->
bstrSource
);
SysFreeString
(
ei
->
bstrDescription
);
SysFreeString
(
ei
->
bstrHelpFile
);
memset
(
ei
,
0
,
sizeof
(
*
ei
));
}
static
inline
VARIANT
*
stack_pop
(
exec_ctx_t
*
ctx
)
{
assert
(
ctx
->
top
);
...
...
@@ -1321,7 +1329,7 @@ static HRESULT interp_errmode(exec_ctx_t *ctx)
TRACE
(
"%d
\n
"
,
err_mode
);
ctx
->
resume_next
=
err_mode
;
c
tx
->
script
->
err_number
=
S_OK
;
c
lear_ei
(
&
ctx
->
script
->
ei
)
;
return
S_OK
;
}
...
...
@@ -2158,7 +2166,7 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPP
op
=
exec
.
instr
->
op
;
hres
=
op_funcs
[
op
](
&
exec
);
if
(
FAILED
(
hres
))
{
ctx
->
e
rr_number
=
hres
=
map_hres
(
hres
);
ctx
->
e
i
.
scode
=
hres
=
map_hres
(
hres
);
if
(
exec
.
resume_next
)
{
unsigned
stack_off
;
...
...
dlls/vbscript/vbscript.c
View file @
8277c248
...
...
@@ -153,6 +153,7 @@ static void release_script(script_ctx_t *ctx)
class_desc_t
*
class_desc
;
collect_objects
(
ctx
);
clear_ei
(
&
ctx
->
ei
);
release_dynamic_vars
(
ctx
->
global_vars
);
ctx
->
global_vars
=
NULL
;
...
...
dlls/vbscript/vbscript.h
View file @
8277c248
...
...
@@ -192,7 +192,7 @@ struct _script_ctx_t {
class_desc_t
err_desc
;
vbdisp_t
*
err_obj
;
HRESULT
err_number
;
EXCEPINFO
ei
;
dynamic_var_t
*
global_vars
;
function_t
*
global_funcs
;
...
...
@@ -358,6 +358,7 @@ HRESULT compile_script(script_ctx_t*,const WCHAR*,const WCHAR*,DWORD,vbscode_t**
HRESULT
exec_script
(
script_ctx_t
*
,
function_t
*
,
vbdisp_t
*
,
DISPPARAMS
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
void
release_dynamic_vars
(
dynamic_var_t
*
)
DECLSPEC_HIDDEN
;
IDispatch
*
lookup_named_item
(
script_ctx_t
*
,
const
WCHAR
*
,
unsigned
)
DECLSPEC_HIDDEN
;
void
clear_ei
(
EXCEPINFO
*
)
DECLSPEC_HIDDEN
;
typedef
struct
{
UINT16
len
;
...
...
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