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
fac907b0
Commit
fac907b0
authored
Sep 25, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrobj: Store script dispatch in script host.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3013d5d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
scrobj.c
dlls/scrobj/scrobj.c
+18
-0
scrobj.c
dlls/scrobj/tests/scrobj.c
+0
-3
No files found.
dlls/scrobj/scrobj.c
View file @
fac907b0
...
...
@@ -139,6 +139,7 @@ struct script_host
IActiveScript
*
active_script
;
IActiveScriptParse
*
parser
;
IDispatchEx
*
script_dispatch
;
struct
scriptlet_instance
*
object
;
SCRIPTSTATE
state
;
BOOL
cloned
;
...
...
@@ -806,6 +807,11 @@ static void detach_script_hosts(struct list *hosts)
if
(
host
->
state
!=
SCRIPTSTATE_UNINITIALIZED
)
set_script_state
(
host
,
SCRIPTSTATE_UNINITIALIZED
);
list_remove
(
&
host
->
entry
);
host
->
object
=
NULL
;
if
(
host
->
script_dispatch
)
{
IDispatchEx_Release
(
host
->
script_dispatch
);
host
->
script_dispatch
=
NULL
;
}
if
(
host
->
parser
)
{
IActiveScript_Close
(
host
->
active_script
);
...
...
@@ -1025,6 +1031,7 @@ static HRESULT create_scriptlet_instance(struct scriptlet_factory *factory, IDis
{
struct
script_host
*
factory_host
,
*
host
;
struct
scriptlet_instance
*
obj
;
IDispatch
*
script_dispatch
;
HRESULT
hres
;
if
(
!
(
obj
=
heap_alloc_zero
(
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
...
...
@@ -1053,6 +1060,17 @@ static HRESULT create_scriptlet_instance(struct scriptlet_factory *factory, IDis
hres
=
IActiveScript_AddNamedItem
(
host
->
active_script
,
L"globals"
,
SCRIPTITEM_ISVISIBLE
);
if
(
FAILED
(
hres
))
break
;
hres
=
IActiveScript_GetScriptDispatch
(
host
->
active_script
,
NULL
,
&
script_dispatch
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IDispatch_QueryInterface
(
script_dispatch
,
&
IID_IDispatchEx
,
(
void
**
)
&
host
->
script_dispatch
);
IDispatch_Release
(
script_dispatch
);
if
(
FAILED
(
hres
))
{
FIXME
(
"IDispatchEx not supported by script engine
\n
"
);
return
hres
;
}
}
if
(
SUCCEEDED
(
hres
))
hres
=
parse_scripts
(
factory
,
&
obj
->
hosts
,
TRUE
);
...
...
dlls/scrobj/tests/scrobj.c
View file @
fac907b0
...
...
@@ -829,7 +829,6 @@ static void test_create_object(void)
CHECK_CALLED
(
SetScriptSite
);
CHECK_CALLED
(
AddNamedItem_scriptlet
);
CHECK_CALLED
(
AddNamedItem_globals
);
todo_wine
CHECK_CALLED
(
GetScriptDispatch
);
todo_wine
CHECK_CALLED
(
GetDispID_vbAddOne
);
...
...
@@ -1036,7 +1035,6 @@ static void test_create_object(void)
CHECK_CALLED
(
SetScriptSite
);
CHECK_CALLED
(
AddNamedItem_scriptlet
);
CHECK_CALLED
(
AddNamedItem_globals
);
todo_wine
CHECK_CALLED
(
GetScriptDispatch
);
todo_wine
CHECK_CALLED
(
GetDispID_vbAddOne
);
...
...
@@ -1074,7 +1072,6 @@ static void test_create_object(void)
CHECK_CALLED
(
SetScriptSite
);
CHECK_CALLED
(
AddNamedItem_scriptlet
);
CHECK_CALLED
(
AddNamedItem_globals
);
todo_wine
CHECK_CALLED
(
GetScriptDispatch
);
todo_wine
CHECK_CALLED
(
GetDispID_vbAddOne
);
...
...
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