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
a1543a3f
Commit
a1543a3f
authored
Feb 06, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed handling VT_VARIANT|VY_BYREF types.
parent
13164037
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
jsutils.c
dlls/jscript/jsutils.c
+3
-0
run.c
dlls/jscript/tests/run.c
+9
-3
No files found.
dlls/jscript/jsutils.c
View file @
a1543a3f
...
@@ -246,6 +246,9 @@ HRESULT jsval_copy(jsval_t v, jsval_t *r)
...
@@ -246,6 +246,9 @@ HRESULT jsval_copy(jsval_t v, jsval_t *r)
HRESULT
variant_to_jsval
(
VARIANT
*
var
,
jsval_t
*
r
)
HRESULT
variant_to_jsval
(
VARIANT
*
var
,
jsval_t
*
r
)
{
{
if
(
V_VT
(
var
)
==
(
VT_VARIANT
|
VT_BYREF
))
var
=
V_VARIANTREF
(
var
);
switch
(
V_VT
(
var
))
{
switch
(
V_VT
(
var
))
{
case
VT_EMPTY
:
case
VT_EMPTY
:
*
r
=
jsval_undefined
();
*
r
=
jsval_undefined
();
...
...
dlls/jscript/tests/run.c
View file @
a1543a3f
...
@@ -1211,7 +1211,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
...
@@ -1211,7 +1211,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return
S_OK
;
return
S_OK
;
case
DISPID_GLOBAL_TESTARGTYPES
:
{
case
DISPID_GLOBAL_TESTARGTYPES
:
{
VARIANT
args
[
5
]
;
VARIANT
args
[
6
],
v
;
DISPPARAMS
dp
=
{
args
,
NULL
,
sizeof
(
args
)
/
sizeof
(
*
args
),
0
};
DISPPARAMS
dp
=
{
args
,
NULL
,
sizeof
(
args
)
/
sizeof
(
*
args
),
0
};
HRESULT
hres
;
HRESULT
hres
;
...
@@ -1249,6 +1249,10 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
...
@@ -1249,6 +1249,10 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_UNKNOWN
(
args
+
3
)
=
NULL
;
V_UNKNOWN
(
args
+
3
)
=
NULL
;
V_VT
(
args
+
4
)
=
VT_UI4
;
V_VT
(
args
+
4
)
=
VT_UI4
;
V_UI4
(
args
+
4
)
=
0xffffffff
;
V_UI4
(
args
+
4
)
=
0xffffffff
;
V_VT
(
args
+
5
)
=
VT_BYREF
|
VT_VARIANT
;
V_VARIANTREF
(
args
+
5
)
=
&
v
;
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
2
;
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"Invoke failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Invoke failed: %08x
\n
"
,
hres
);
...
@@ -2412,14 +2416,16 @@ static BOOL run_tests(void)
...
@@ -2412,14 +2416,16 @@ static BOOL run_tests(void)
CHECK_CALLED
(
global_propargput_i
);
CHECK_CALLED
(
global_propargput_i
);
SET_EXPECT
(
global_testargtypes_i
);
SET_EXPECT
(
global_testargtypes_i
);
parse_script_a
(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp, function(ui4,nullunk,d,i,s) {"
parse_script_a
(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp, function(
i4ref,
ui4,nullunk,d,i,s) {"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
" ok(getVT(nullunk) === 'VT_DISPATCH', 'getVT(nullunk) = ' + getVT(nullunk));"
" ok(getVT(nullunk) === 'VT_DISPATCH', 'getVT(nullunk) = ' + getVT(nullunk));"
" ok(nullunk === null, 'nullunk !== null');"
" ok(nullunk === null, 'nullunk !== null');"
" ok(getVT(ui4) === 'VT_R8', 'getVT(
s) = ' + getVT(s
));"
" ok(getVT(ui4) === 'VT_R8', 'getVT(
ui4) = ' + getVT(ui4
));"
" ok(ui4 > 0, 'ui4 = ' + ui4);"
" ok(ui4 > 0, 'ui4 = ' + ui4);"
" ok(getVT(i4ref) === 'VT_I4', 'getVT(i4ref) = ' + getVT(i4ref));"
" ok(i4ref === 2, 'i4ref = ' + i4ref);"
"});"
);
"});"
);
CHECK_CALLED
(
global_testargtypes_i
);
CHECK_CALLED
(
global_testargtypes_i
);
...
...
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