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
2e97b1f0
Commit
2e97b1f0
authored
Sep 02, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw 'Object expected' error in call_expression_eval.
parent
c4bc5be2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
engine.c
dlls/jscript/engine.c
+8
-5
jscript_En.rc
dlls/jscript/jscript_En.rc
+1
-0
resource.h
dlls/jscript/resource.h
+1
-0
api.js
dlls/jscript/tests/api.js
+1
-0
No files found.
dlls/jscript/engine.c
View file @
2e97b1f0
...
...
@@ -1570,16 +1570,19 @@ HRESULT call_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags,
if
(
SUCCEEDED
(
hres
))
{
switch
(
exprval
.
type
)
{
case
EXPRVAL_VARIANT
:
if
(
V_VT
(
&
exprval
.
u
.
var
)
!
=
VT_DISPATCH
)
return
throw_type_error
(
ctx
->
var_disp
->
ctx
,
ei
,
IDS_NO_PROPERTY
,
NULL
);
hres
=
disp_call
(
V_DISPATCH
(
&
exprval
.
u
.
var
),
DISPID_VALUE
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
if
(
V_VT
(
&
exprval
.
u
.
var
)
=
=
VT_DISPATCH
)
hres
=
disp_call
(
V_DISPATCH
(
&
exprval
.
u
.
var
),
DISPID_VALUE
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
else
hres
=
throw_type_error
(
ctx
->
var_disp
->
ctx
,
ei
,
IDS_NO_PROPERTY
,
NULL
);
break
;
case
EXPRVAL_IDREF
:
hres
=
disp_call
(
exprval
.
u
.
idref
.
disp
,
exprval
.
u
.
idref
.
id
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
break
;
case
EXPRVAL_INVALID
:
hres
=
throw_type_error
(
ctx
->
var_disp
->
ctx
,
ei
,
IDS_OBJECT_EXPECTED
,
NULL
);
break
;
default:
FIXME
(
"unimplemented type %d
\n
"
,
exprval
.
type
);
hres
=
E_NOTIMPL
;
...
...
dlls/jscript/jscript_En.rc
View file @
2e97b1f0
...
...
@@ -34,6 +34,7 @@ STRINGTABLE DISCARDABLE
IDS_NOT_FUNC "Function expected"
IDS_NOT_DATE "'[object]' is not a date object"
IDS_NOT_NUM "Number expected"
IDS_OBJECT_EXPECTED "Object expected"
IDS_ILLEGAL_ASSIGN "Illegal assignment"
IDS_UNDEFINED "'|' is undefined"
IDS_NOT_BOOL "Boolean object expected"
...
...
dlls/jscript/resource.h
View file @
2e97b1f0
...
...
@@ -30,6 +30,7 @@
#define IDS_NOT_FUNC 0x138A
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_NUM 0x1389
#define IDS_OBJECT_EXPECTED 0x128F
#define IDS_ILLEGAL_ASSIGN 0x1390
#define IDS_UNDEFINED 0x1391
#define IDS_NOT_BOOL 0x1392
...
...
dlls/jscript/tests/api.js
View file @
2e97b1f0
...
...
@@ -1481,6 +1481,7 @@ exception_test(function() {eval("for(i=0;i<10")}, "SyntaxError", -2146827284);
exception_test
(
function
()
{
eval
(
"while("
)},
"SyntaxError"
,
-
2146827286
);
exception_test
(
function
()
{
eval
(
"if("
)},
"SyntaxError"
,
-
2146827286
);
exception_test
(
function
()
{
eval
(
"'unterminated"
)},
"SyntaxError"
,
-
2146827273
);
exception_test
(
function
()
{
eval
(
"nonexistingfunc()"
)},
"TypeError"
,
-
2146823537
);
function
testObjectInherit
(
obj
,
constr
,
ts
,
tls
,
vo
)
{
ok
(
obj
instanceof
Object
,
"obj is not instance of Object"
);
...
...
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