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
e050ff5e
Commit
e050ff5e
authored
Oct 04, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Move OnEnterScript/OnLeaveScript calls to exec_script.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1de8e293
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
27 deletions
+17
-27
interp.c
dlls/vbscript/interp.c
+8
-2
vbdisp.c
dlls/vbscript/vbdisp.c
+7
-16
vbscript.c
dlls/vbscript/vbscript.c
+1
-8
vbscript.h
dlls/vbscript/vbscript.h
+1
-1
No files found.
dlls/vbscript/interp.c
View file @
e050ff5e
...
...
@@ -588,7 +588,7 @@ static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res)
break
;
case
REF_FUNC
:
vbstack_to_dp
(
ctx
,
arg_cnt
,
FALSE
,
&
dp
);
hres
=
exec_script
(
ctx
->
script
,
ref
.
u
.
f
,
NULL
,
&
dp
,
res
);
hres
=
exec_script
(
ctx
->
script
,
FALSE
,
ref
.
u
.
f
,
NULL
,
&
dp
,
res
);
if
(
FAILED
(
hres
))
return
hres
;
break
;
...
...
@@ -2086,7 +2086,7 @@ static void release_exec(exec_ctx_t *ctx)
heap_free
(
ctx
->
stack
);
}
HRESULT
exec_script
(
script_ctx_t
*
ctx
,
function_t
*
func
,
vbdisp_t
*
vbthis
,
DISPPARAMS
*
dp
,
VARIANT
*
res
)
HRESULT
exec_script
(
script_ctx_t
*
ctx
,
BOOL
extern_caller
,
function_t
*
func
,
vbdisp_t
*
vbthis
,
DISPPARAMS
*
dp
,
VARIANT
*
res
)
{
exec_ctx_t
exec
=
{
func
->
code_ctx
};
vbsop_t
op
;
...
...
@@ -2148,6 +2148,9 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPP
return
E_OUTOFMEMORY
;
}
if
(
extern_caller
)
IActiveScriptSite_OnEnterScript
(
ctx
->
site
);
if
(
vbthis
)
{
exec
.
this_obj
=
(
IDispatch
*
)
&
vbthis
->
IDispatchEx_iface
;
exec
.
vbthis
=
vbthis
;
...
...
@@ -2220,6 +2223,9 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPP
assert
(
!
exec
.
top
);
if
(
extern_caller
)
IActiveScriptSite_OnLeaveScript
(
ctx
->
site
);
if
(
SUCCEEDED
(
hres
)
&&
res
)
{
*
res
=
exec
.
ret_val
;
V_VT
(
&
exec
.
ret_val
)
=
VT_EMPTY
;
...
...
dlls/vbscript/vbdisp.c
View file @
e050ff5e
...
...
@@ -260,7 +260,7 @@ static BOOL run_terminator(vbdisp_t *This)
return
TRUE
;
This
->
ref
++
;
exec_script
(
This
->
desc
->
ctx
,
This
->
desc
->
funcs
[
This
->
desc
->
class_terminate_id
].
entries
[
VBDISP_CALLGET
],
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
This
->
desc
->
funcs
[
This
->
desc
->
class_terminate_id
].
entries
[
VBDISP_CALLGET
],
This
,
&
dp
,
NULL
);
return
!--
This
->
ref
;
}
...
...
@@ -426,7 +426,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
return
DISP_E_MEMBERNOTFOUND
;
}
return
exec_script
(
This
->
desc
->
ctx
,
func
,
This
,
pdp
,
pvarRes
);
return
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
pdp
,
pvarRes
);
case
DISPATCH_METHOD
:
case
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
:
...
...
@@ -436,7 +436,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
return
DISP_E_MEMBERNOTFOUND
;
}
return
exec_script
(
This
->
desc
->
ctx
,
func
,
This
,
pdp
,
pvarRes
);
return
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
pdp
,
pvarRes
);
case
DISPATCH_PROPERTYPUT
:
case
DISPATCH_PROPERTYPUTREF
:
case
DISPATCH_PROPERTYPUT
|
DISPATCH_PROPERTYPUTREF
:
{
...
...
@@ -461,7 +461,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
return
DISP_E_MEMBERNOTFOUND
;
}
hres
=
exec_script
(
This
->
desc
->
ctx
,
func
,
This
,
&
dp
,
NULL
);
hres
=
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
&
dp
,
NULL
);
if
(
needs_release
)
VariantClear
(
&
put_val
);
return
hres
;
...
...
@@ -605,7 +605,7 @@ HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
if
(
SUCCEEDED
(
hres
)
&&
desc
->
class_initialize_id
)
{
DISPPARAMS
dp
=
{
0
};
hres
=
exec_script
(
desc
->
ctx
,
desc
->
funcs
[
desc
->
class_initialize_id
].
entries
[
VBDISP_CALLGET
],
hres
=
exec_script
(
desc
->
ctx
,
FALSE
,
desc
->
funcs
[
desc
->
class_initialize_id
].
entries
[
VBDISP_CALLGET
],
vbdisp
,
&
dp
,
NULL
);
}
...
...
@@ -621,15 +621,8 @@ HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
static
HRESULT
Procedure_invoke
(
vbdisp_t
*
This
,
VARIANT
*
args
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
script_ctx_t
*
ctx
=
This
->
desc
->
ctx
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
IActiveScriptSite_OnEnterScript
(
ctx
->
site
);
hres
=
exec_script
(
ctx
,
This
->
desc
->
value_func
,
NULL
,
NULL
,
res
);
IActiveScriptSite_OnLeaveScript
(
ctx
->
site
);
return
hres
;
return
exec_script
(
ctx
,
TRUE
,
This
->
desc
->
value_func
,
NULL
,
NULL
,
res
);
}
static
const
builtin_prop_t
procedure_props
[]
=
{
...
...
@@ -884,9 +877,7 @@ static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
switch
(
wFlags
)
{
case
DISPATCH_METHOD
:
case
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
:
IActiveScriptSite_OnEnterScript
(
This
->
ctx
->
site
);
hres
=
exec_script
(
This
->
ctx
,
ident
->
u
.
func
,
NULL
,
pdp
,
pvarRes
);
IActiveScriptSite_OnLeaveScript
(
This
->
ctx
->
site
);
hres
=
exec_script
(
This
->
ctx
,
TRUE
,
ident
->
u
.
func
,
NULL
,
pdp
,
pvarRes
);
break
;
default:
FIXME
(
"Unsupported flags %x
\n
"
,
wFlags
);
...
...
dlls/vbscript/vbscript.c
View file @
e050ff5e
...
...
@@ -78,15 +78,8 @@ static inline BOOL is_started(VBScript *This)
static
HRESULT
exec_global_code
(
script_ctx_t
*
ctx
,
vbscode_t
*
code
,
VARIANT
*
res
)
{
HRESULT
hres
;
code
->
pending_exec
=
FALSE
;
IActiveScriptSite_OnEnterScript
(
ctx
->
site
);
hres
=
exec_script
(
ctx
,
&
code
->
main_code
,
NULL
,
NULL
,
res
);
IActiveScriptSite_OnLeaveScript
(
ctx
->
site
);
return
hres
;
return
exec_script
(
ctx
,
TRUE
,
&
code
->
main_code
,
NULL
,
NULL
,
res
);
}
static
void
exec_queued_code
(
script_ctx_t
*
ctx
)
...
...
dlls/vbscript/vbscript.h
View file @
e050ff5e
...
...
@@ -356,7 +356,7 @@ struct _vbscode_t {
void
release_vbscode
(
vbscode_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
compile_script
(
script_ctx_t
*
,
const
WCHAR
*
,
const
WCHAR
*
,
DWORD
,
vbscode_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
exec_script
(
script_ctx_t
*
,
function_t
*
,
vbdisp_t
*
,
DISPPARAMS
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
exec_script
(
script_ctx_t
*
,
BOOL
,
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
;
...
...
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