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
bb4050d7
Commit
bb4050d7
authored
Sep 23, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw correct error in get_length.
parent
8717c388
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
array.c
dlls/jscript/array.c
+2
-4
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
+10
-0
No files found.
dlls/jscript/array.c
View file @
bb4050d7
...
@@ -69,10 +69,8 @@ static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, Dis
...
@@ -69,10 +69,8 @@ static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, Dis
return
S_OK
;
return
S_OK
;
}
}
if
(
!
is_jsdisp
(
vdisp
))
{
if
(
!
is_jsdisp
(
vdisp
))
FIXME
(
"Not JScript object
\n
"
);
return
throw_type_error
(
ctx
,
ei
,
IDS_JSCRIPT_EXPECTED
,
NULL
);
return
E_FAIL
;
}
hres
=
jsdisp_propget_name
(
vdisp
->
u
.
jsdisp
,
lengthW
,
&
var
,
ei
,
NULL
/*FIXME*/
);
hres
=
jsdisp_propget_name
(
vdisp
->
u
.
jsdisp
,
lengthW
,
&
var
,
ei
,
NULL
/*FIXME*/
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
...
...
dlls/jscript/jscript_En.rc
View file @
bb4050d7
...
@@ -38,6 +38,7 @@ STRINGTABLE DISCARDABLE
...
@@ -38,6 +38,7 @@ STRINGTABLE DISCARDABLE
IDS_ILLEGAL_ASSIGN "Illegal assignment"
IDS_ILLEGAL_ASSIGN "Illegal assignment"
IDS_UNDEFINED "'|' is undefined"
IDS_UNDEFINED "'|' is undefined"
IDS_NOT_BOOL "Boolean object expected"
IDS_NOT_BOOL "Boolean object expected"
IDS_JSCRIPT_EXPECTED "JScript object expected"
IDS_REGEXP_SYNTAX_ERROR "Syntax error in regular expression"
IDS_REGEXP_SYNTAX_ERROR "Syntax error in regular expression"
IDS_INVALID_LENGTH "Array length must be a finite positive integer"
IDS_INVALID_LENGTH "Array length must be a finite positive integer"
}
}
dlls/jscript/resource.h
View file @
bb4050d7
...
@@ -34,5 +34,6 @@
...
@@ -34,5 +34,6 @@
#define IDS_ILLEGAL_ASSIGN 0x1390
#define IDS_ILLEGAL_ASSIGN 0x1390
#define IDS_UNDEFINED 0x1391
#define IDS_UNDEFINED 0x1391
#define IDS_NOT_BOOL 0x1392
#define IDS_NOT_BOOL 0x1392
#define IDS_JSCRIPT_EXPECTED 0x1396
#define IDS_REGEXP_SYNTAX_ERROR 0x1399
#define IDS_REGEXP_SYNTAX_ERROR 0x1399
#define IDS_INVALID_LENGTH 0x13A5
#define IDS_INVALID_LENGTH 0x13A5
dlls/jscript/tests/api.js
View file @
bb4050d7
...
@@ -1621,6 +1621,16 @@ exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273);
...
@@ -1621,6 +1621,16 @@ exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273);
exception_test
(
function
()
{
eval
(
"nonexistingfunc()"
)},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
eval
(
"nonexistingfunc()"
)},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
RegExp
(
/a/
,
"g"
);},
"RegExpError"
,
-
2146823271
);
exception_test
(
function
()
{
RegExp
(
/a/
,
"g"
);},
"RegExpError"
,
-
2146823271
);
function
testArrayHostThis
(
func
)
{
exception_test
(
function
()
{
Array
.
prototype
[
func
].
call
(
testObj
);
},
"TypeError"
,
-
2146823274
);
}
testArrayHostThis
(
"push"
);
testArrayHostThis
(
"shift"
);
testArrayHostThis
(
"slice"
);
testArrayHostThis
(
"splice"
);
testArrayHostThis
(
"unshift"
);
function
testObjectInherit
(
obj
,
constr
,
ts
,
tls
,
vo
)
{
function
testObjectInherit
(
obj
,
constr
,
ts
,
tls
,
vo
)
{
ok
(
obj
instanceof
Object
,
"obj is not instance of Object"
);
ok
(
obj
instanceof
Object
,
"obj is not instance of Object"
);
ok
(
obj
instanceof
constr
,
"obj is not instance of its constructor"
);
ok
(
obj
instanceof
constr
,
"obj is not instance of its constructor"
);
...
...
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