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
a7cc9441
Commit
a7cc9441
authored
Jun 21, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Correctly throw an exception if instanceof expression is not used on function.
parent
42c2bd7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
engine.c
dlls/jscript/engine.c
+2
-3
api.js
dlls/jscript/tests/api.js
+1
-0
No files found.
dlls/jscript/engine.c
View file @
a7cc9441
...
@@ -2001,15 +2001,14 @@ static HRESULT instanceof_eval(script_ctx_t *ctx, VARIANT *inst, VARIANT *objv,
...
@@ -2001,15 +2001,14 @@ static HRESULT instanceof_eval(script_ctx_t *ctx, VARIANT *inst, VARIANT *objv,
obj
=
iface_to_jsdisp
((
IUnknown
*
)
V_DISPATCH
(
objv
));
obj
=
iface_to_jsdisp
((
IUnknown
*
)
V_DISPATCH
(
objv
));
if
(
!
obj
)
{
if
(
!
obj
)
{
FIXME
(
"
throw TypeError
\n
"
);
FIXME
(
"
non-jsdisp objects not supported
\n
"
);
return
E_FAIL
;
return
E_FAIL
;
}
}
if
(
is_class
(
obj
,
JSCLASS_FUNCTION
))
{
if
(
is_class
(
obj
,
JSCLASS_FUNCTION
))
{
hres
=
jsdisp_propget_name
(
obj
,
prototypeW
,
&
var
,
ei
,
NULL
/*FIXME*/
);
hres
=
jsdisp_propget_name
(
obj
,
prototypeW
,
&
var
,
ei
,
NULL
/*FIXME*/
);
}
else
{
}
else
{
FIXME
(
"throw TypeError
\n
"
);
hres
=
throw_type_error
(
ctx
,
ei
,
JS_E_FUNCTION_EXPECTED
,
NULL
);
hres
=
E_FAIL
;
}
}
jsdisp_release
(
obj
);
jsdisp_release
(
obj
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
...
...
dlls/jscript/tests/api.js
View file @
a7cc9441
...
@@ -1982,6 +1982,7 @@ testException(function() {(new Number(3)).toString(1);}, "E_INVALID_CALL_ARG");
...
@@ -1982,6 +1982,7 @@ testException(function() {(new Number(3)).toString(1);}, "E_INVALID_CALL_ARG");
testException
(
function
()
{
not_existing_variable
.
something
();},
"E_UNDEFINED"
);
testException
(
function
()
{
not_existing_variable
.
something
();},
"E_UNDEFINED"
);
testException
(
function
()
{
date
();},
"E_NOT_FUNC"
);
testException
(
function
()
{
date
();},
"E_NOT_FUNC"
);
testException
(
function
()
{
arr
();},
"E_NOT_FUNC"
);
testException
(
function
()
{
arr
();},
"E_NOT_FUNC"
);
testException
(
function
()
{(
new
Object
)
instanceof
(
new
Object
);},
"E_NOT_FUNC"
);
testException
(
function
()
{
eval
(
"nonexistingfunc()"
)},
"E_OBJECT_EXPECTED"
);
testException
(
function
()
{
eval
(
"nonexistingfunc()"
)},
"E_OBJECT_EXPECTED"
);
testException
(
function
()
{(
new
Object
())
instanceof
3
;},
"E_NOT_FUNC"
);
testException
(
function
()
{(
new
Object
())
instanceof
3
;},
"E_NOT_FUNC"
);
testException
(
function
()
{(
new
Object
())
instanceof
null
;},
"E_NOT_FUNC"
);
testException
(
function
()
{(
new
Object
())
instanceof
null
;},
"E_NOT_FUNC"
);
...
...
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