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
51a2ccb4
Commit
51a2ccb4
authored
Sep 05, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added SCRIPTSTATE_STARTED implementation.
parent
69f8b4b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
jscript.c
dlls/jscript/jscript.c
+30
-2
jscript.c
dlls/jscript/tests/jscript.c
+7
-0
No files found.
dlls/jscript/jscript.c
View file @
51a2ccb4
...
...
@@ -116,6 +116,16 @@ static void clear_script_queue(JScript *This)
This
->
queue_head
=
This
->
queue_tail
=
NULL
;
}
static
void
exec_queued_code
(
JScript
*
This
)
{
parser_ctx_t
*
iter
;
for
(
iter
=
This
->
queue_head
;
iter
;
iter
=
iter
->
next
)
exec_global_code
(
This
,
iter
);
clear_script_queue
(
This
);
}
#define ACTSCRIPT_THIS(iface) DEFINE_THIS(JScript, IActiveScript, iface)
static
HRESULT
WINAPI
JScript_QueryInterface
(
IActiveScript
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -235,8 +245,26 @@ static HRESULT WINAPI JScript_GetScriptSite(IActiveScript *iface, REFIID riid,
static
HRESULT
WINAPI
JScript_SetScriptState
(
IActiveScript
*
iface
,
SCRIPTSTATE
ss
)
{
JScript
*
This
=
ACTSCRIPT_THIS
(
iface
);
FIXME
(
"(%p)->(%d)
\n
"
,
This
,
ss
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ss
);
if
(
!
This
->
ctx
||
GetCurrentThreadId
()
!=
This
->
thread_id
)
return
E_UNEXPECTED
;
switch
(
ss
)
{
case
SCRIPTSTATE_STARTED
:
if
(
This
->
ctx
->
state
==
SCRIPTSTATE_CLOSED
)
return
E_UNEXPECTED
;
exec_queued_code
(
This
);
break
;
default:
FIXME
(
"unimplemented state %d
\n
"
,
ss
);
return
E_NOTIMPL
;
}
change_state
(
This
,
ss
);
return
S_OK
;
}
static
HRESULT
WINAPI
JScript_GetScriptState
(
IActiveScript
*
iface
,
SCRIPTSTATE
*
pssState
)
...
...
dlls/jscript/tests/jscript.c
View file @
51a2ccb4
...
...
@@ -317,6 +317,13 @@ static void test_jscript(void)
test_script_dispatch
(
script
,
TRUE
);
SET_EXPECT
(
OnStateChange_STARTED
);
hres
=
IActiveScript_SetScriptState
(
script
,
SCRIPTSTATE_STARTED
);
ok
(
hres
==
S_OK
,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_STARTED
);
test_state
(
script
,
SCRIPTSTATE_STARTED
);
SET_EXPECT
(
OnStateChange_CLOSED
);
hres
=
IActiveScript_Close
(
script
);
ok
(
hres
==
S_OK
,
"Close failed: %08x
\n
"
,
hres
);
...
...
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