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
3c91e5ed
Commit
3c91e5ed
authored
Apr 12, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Support passing EXPRVAL_JSVAL through JS stack.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9d1ae850
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
engine.c
dlls/jscript/engine.c
+24
-1
No files found.
dlls/jscript/engine.c
View file @
3c91e5ed
...
@@ -171,7 +171,10 @@ static HRESULT stack_push_exprval(script_ctx_t *ctx, exprval_t *val)
...
@@ -171,7 +171,10 @@ static HRESULT stack_push_exprval(script_ctx_t *ctx, exprval_t *val)
switch
(
val
->
type
)
{
switch
(
val
->
type
)
{
case
EXPRVAL_JSVAL
:
case
EXPRVAL_JSVAL
:
assert
(
0
);
hres
=
stack_push
(
ctx
,
jsval_null
());
if
(
SUCCEEDED
(
hres
))
hres
=
stack_push
(
ctx
,
val
->
u
.
val
);
return
hres
;
case
EXPRVAL_IDREF
:
case
EXPRVAL_IDREF
:
hres
=
stack_push
(
ctx
,
jsval_disp
(
val
->
u
.
idref
.
disp
));
hres
=
stack_push
(
ctx
,
jsval_disp
(
val
->
u
.
idref
.
disp
));
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
...
@@ -245,6 +248,10 @@ static BOOL stack_topn_exprval(script_ctx_t *ctx, unsigned n, exprval_t *r)
...
@@ -245,6 +248,10 @@ static BOOL stack_topn_exprval(script_ctx_t *ctx, unsigned n, exprval_t *r)
assert
(
is_number
(
stack_topn
(
ctx
,
n
)));
assert
(
is_number
(
stack_topn
(
ctx
,
n
)));
r
->
u
.
hres
=
get_number
(
stack_topn
(
ctx
,
n
));
r
->
u
.
hres
=
get_number
(
stack_topn
(
ctx
,
n
));
return
FALSE
;
return
FALSE
;
case
JSV_NULL
:
r
->
type
=
EXPRVAL_JSVAL
;
r
->
u
.
val
=
stack_topn
(
ctx
,
n
);
return
TRUE
;
default:
default:
assert
(
0
);
assert
(
0
);
return
FALSE
;
return
FALSE
;
...
@@ -268,6 +275,9 @@ static HRESULT exprval_propput(script_ctx_t *ctx, exprval_t *ref, jsval_t v)
...
@@ -268,6 +275,9 @@ static HRESULT exprval_propput(script_ctx_t *ctx, exprval_t *ref, jsval_t v)
}
}
case
EXPRVAL_IDREF
:
case
EXPRVAL_IDREF
:
return
disp_propput
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
v
);
return
disp_propput
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
v
);
case
EXPRVAL_JSVAL
:
WARN
(
"ignoring an attempt to set value reference
\n
"
);
return
S_OK
;
default:
default:
assert
(
0
);
assert
(
0
);
return
E_FAIL
;
return
E_FAIL
;
...
@@ -281,6 +291,8 @@ static HRESULT exprval_propget(script_ctx_t *ctx, exprval_t *ref, jsval_t *r)
...
@@ -281,6 +291,8 @@ static HRESULT exprval_propget(script_ctx_t *ctx, exprval_t *ref, jsval_t *r)
return
jsval_copy
(
ctx
->
stack
[
ref
->
u
.
off
],
r
);
return
jsval_copy
(
ctx
->
stack
[
ref
->
u
.
off
],
r
);
case
EXPRVAL_IDREF
:
case
EXPRVAL_IDREF
:
return
disp_propget
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
r
);
return
disp_propget
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
r
);
case
EXPRVAL_JSVAL
:
return
jsval_copy
(
ref
->
u
.
val
,
r
);
default:
default:
assert
(
0
);
assert
(
0
);
return
E_FAIL
;
return
E_FAIL
;
...
@@ -302,6 +314,17 @@ static HRESULT exprval_call(script_ctx_t *ctx, exprval_t *ref, WORD flags, unsig
...
@@ -302,6 +314,17 @@ static HRESULT exprval_call(script_ctx_t *ctx, exprval_t *ref, WORD flags, unsig
}
}
case
EXPRVAL_IDREF
:
case
EXPRVAL_IDREF
:
return
disp_call
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
flags
,
argc
,
argv
,
r
);
return
disp_call
(
ctx
,
ref
->
u
.
idref
.
disp
,
ref
->
u
.
idref
.
id
,
flags
,
argc
,
argv
,
r
);
case
EXPRVAL_JSVAL
:
{
IDispatch
*
obj
;
HRESULT
hres
;
hres
=
to_object
(
ctx
,
ref
->
u
.
val
,
&
obj
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
disp_call_value
(
ctx
,
obj
,
NULL
,
flags
,
argc
,
argv
,
r
);
IDispatch_Release
(
obj
);
}
return
hres
;
}
default:
default:
assert
(
0
);
assert
(
0
);
return
E_FAIL
;
return
E_FAIL
;
...
...
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