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
dda957d8
Commit
dda957d8
authored
Sep 06, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed typeof implementation for null VT_DISPATCH.
parent
d1f5fa65
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
engine.c
dlls/jscript/engine.c
+1
-2
lang.js
dlls/jscript/tests/lang.js
+3
-0
run.c
dlls/jscript/tests/run.c
+20
-0
No files found.
dlls/jscript/engine.c
View file @
dda957d8
...
@@ -2336,8 +2336,7 @@ static HRESULT typeof_exprval(exec_ctx_t *ctx, exprval_t *exprval, jsexcept_t *e
...
@@ -2336,8 +2336,7 @@ static HRESULT typeof_exprval(exec_ctx_t *ctx, exprval_t *exprval, jsexcept_t *e
case
VT_DISPATCH
:
{
case
VT_DISPATCH
:
{
DispatchEx
*
dispex
;
DispatchEx
*
dispex
;
dispex
=
iface_to_jsdisp
((
IUnknown
*
)
V_DISPATCH
(
&
val
));
if
(
V_DISPATCH
(
&
val
)
&&
(
dispex
=
iface_to_jsdisp
((
IUnknown
*
)
V_DISPATCH
(
&
val
))))
{
if
(
dispex
)
{
*
ret
=
is_class
(
dispex
,
JSCLASS_FUNCTION
)
?
functionW
:
objectW
;
*
ret
=
is_class
(
dispex
,
JSCLASS_FUNCTION
)
?
functionW
:
objectW
;
jsdisp_release
(
dispex
);
jsdisp_release
(
dispex
);
}
else
{
}
else
{
...
...
dlls/jscript/tests/lang.js
View file @
dda957d8
...
@@ -922,6 +922,9 @@ ok(re.source === "=(\\?|%3F)", "re.source = " + re.source);
...
@@ -922,6 +922,9 @@ ok(re.source === "=(\\?|%3F)", "re.source = " + re.source);
ok
(
createNullBSTR
()
===
''
,
"createNullBSTR() !== ''"
);
ok
(
createNullBSTR
()
===
''
,
"createNullBSTR() !== ''"
);
ok
(
getVT
(
nullDisp
)
===
"VT_DISPATCH"
,
"getVT(nullDisp) = "
+
typeof
(
nullDisp
));
ok
(
typeof
(
nullDisp
)
===
"object"
,
"typeof(nullDisp) = "
+
typeof
(
nullDisp
));
function
do_test
()
{}
function
do_test
()
{}
function
nosemicolon
()
{}
nosemicolon
();
function
nosemicolon
()
{}
nosemicolon
();
function
()
{}
nosemicolon
();
function
()
{}
nosemicolon
();
...
...
dlls/jscript/tests/run.c
View file @
dda957d8
...
@@ -76,6 +76,7 @@ DEFINE_EXPECT(GetItemInfo_testVal);
...
@@ -76,6 +76,7 @@ DEFINE_EXPECT(GetItemInfo_testVal);
#define DISPID_GLOBAL_GETVT 0x1005
#define DISPID_GLOBAL_GETVT 0x1005
#define DISPID_GLOBAL_TESTOBJ 0x1006
#define DISPID_GLOBAL_TESTOBJ 0x1006
#define DISPID_GLOBAL_NULL_BSTR 0x1007
#define DISPID_GLOBAL_NULL_BSTR 0x1007
#define DISPID_GLOBAL_NULL_DISP 0x1008
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
CHAR
testA
[]
=
"test"
;
static
const
CHAR
testA
[]
=
"test"
;
...
@@ -298,6 +299,10 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
...
@@ -298,6 +299,10 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_NULL_BSTR
;
*
pid
=
DISPID_GLOBAL_NULL_BSTR
;
return
S_OK
;
return
S_OK
;
}
}
if
(
!
strcmp_wa
(
bstrName
,
"nullDisp"
))
{
*
pid
=
DISPID_GLOBAL_NULL_DISP
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"notExists"
))
{
if
(
!
strcmp_wa
(
bstrName
,
"notExists"
))
{
CHECK_EXPECT
(
global_notexists_d
);
CHECK_EXPECT
(
global_notexists_d
);
ok
(
grfdex
==
fdexNameCaseSensitive
,
"grfdex = %x
\n
"
,
grfdex
);
ok
(
grfdex
==
fdexNameCaseSensitive
,
"grfdex = %x
\n
"
,
grfdex
);
...
@@ -456,6 +461,21 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
...
@@ -456,6 +461,21 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_BSTR
(
pvarRes
)
=
NULL
;
V_BSTR
(
pvarRes
)
=
NULL
;
}
}
return
S_OK
;
return
S_OK
;
case
DISPID_GLOBAL_NULL_DISP
:
ok
(
wFlags
==
INVOKE_PROPERTYGET
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
!
pdp
->
rgvarg
,
"rgvarg != NULL
\n
"
);
ok
(
!
pdp
->
rgdispidNamedArgs
,
"rgdispidNamedArgs != NULL
\n
"
);
ok
(
!
pdp
->
cArgs
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
pvarRes
!=
NULL
,
"pvarRes == NULL
\n
"
);
ok
(
V_VT
(
pvarRes
)
==
VT_EMPTY
,
"V_VT(pvarRes) = %d
\n
"
,
V_VT
(
pvarRes
));
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
V_VT
(
pvarRes
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvarRes
)
=
NULL
;
return
S_OK
;
}
}
ok
(
0
,
"unexpected call %x
\n
"
,
id
);
ok
(
0
,
"unexpected call %x
\n
"
,
id
);
...
...
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