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
229a583c
Commit
229a583c
authored
Oct 18, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Move create_script_disp call to SetScriptSite.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cbf62049
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
global.c
dlls/vbscript/global.c
+0
-12
vbscript.c
dlls/vbscript/vbscript.c
+13
-1
No files found.
dlls/vbscript/global.c
View file @
229a583c
...
...
@@ -2860,14 +2860,6 @@ void detach_global_objects(script_ctx_t *ctx)
IDispatch_Release
(
&
ctx
->
global_obj
->
IDispatch_iface
);
ctx
->
global_obj
=
NULL
;
}
if
(
ctx
->
script_obj
)
{
ScriptDisp
*
script_obj
=
ctx
->
script_obj
;
ctx
->
script_obj
=
NULL
;
script_obj
->
ctx
=
NULL
;
IDispatchEx_Release
(
&
script_obj
->
IDispatchEx_iface
);
}
}
HRESULT
init_global
(
script_ctx_t
*
ctx
)
...
...
@@ -2878,9 +2870,5 @@ HRESULT init_global(script_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_script_disp
(
ctx
,
&
ctx
->
script_obj
);
if
(
FAILED
(
hres
))
return
hres
;
return
create_builtin_dispatch
(
ctx
,
err_props
,
ARRAY_SIZE
(
err_props
),
&
ctx
->
err_obj
);
}
dlls/vbscript/vbscript.c
View file @
229a583c
...
...
@@ -182,6 +182,14 @@ static void release_script(script_ctx_t *ctx)
ctx
->
site
=
NULL
;
}
if
(
ctx
->
script_obj
)
{
ScriptDisp
*
script_obj
=
ctx
->
script_obj
;
ctx
->
script_obj
=
NULL
;
script_obj
->
ctx
=
NULL
;
IDispatchEx_Release
(
&
script_obj
->
IDispatchEx_iface
);
}
detach_global_objects
(
ctx
);
heap_pool_free
(
&
ctx
->
heap
);
heap_pool_init
(
&
ctx
->
heap
);
...
...
@@ -415,6 +423,10 @@ static HRESULT WINAPI VBScript_SetScriptSite(IActiveScript *iface, IActiveScript
if
(
InterlockedCompareExchange
(
&
This
->
thread_id
,
GetCurrentThreadId
(),
0
))
return
E_UNEXPECTED
;
hres
=
create_script_disp
(
This
->
ctx
,
&
This
->
ctx
->
script_obj
);
if
(
FAILED
(
hres
))
return
hres
;
This
->
ctx
->
site
=
pass
;
IActiveScriptSite_AddRef
(
This
->
ctx
->
site
);
...
...
@@ -514,7 +526,7 @@ static HRESULT WINAPI VBScript_AddNamedItem(IActiveScript *iface, LPCOLESTR pstr
TRACE
(
"(%p)->(%s %x)
\n
"
,
This
,
debugstr_w
(
pstrName
),
dwFlags
);
if
(
This
->
thread_id
!=
GetCurrentThreadId
()
||
This
->
state
==
SCRIPTSTATE_CLOSED
)
if
(
This
->
thread_id
!=
GetCurrentThreadId
()
||
!
This
->
ctx
->
site
)
return
E_UNEXPECTED
;
if
(
dwFlags
&
SCRIPTITEM_GLOBALMEMBERS
)
{
...
...
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