Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c168918d
Commit
c168918d
authored
Sep 24, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw type error fot Array.toString with wrong 'this' call.
parent
a8c7e97d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
4 deletions
+67
-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
+63
-0
No files found.
dlls/jscript/array.c
View file @
c168918d
...
@@ -936,10 +936,8 @@ static HRESULT Array_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
...
@@ -936,10 +936,8 @@ static HRESULT Array_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
array
=
array_this
(
jsthis
);
array
=
array_this
(
jsthis
);
if
(
!
array
)
{
if
(
!
array
)
FIXME
(
"not Array object
\n
"
);
return
throw_type_error
(
ctx
,
ei
,
IDS_ARRAY_EXPECTED
,
NULL
);
return
E_FAIL
;
}
return
array_join
(
ctx
,
&
array
->
dispex
,
array
->
length
,
default_separatorW
,
retv
,
ei
,
sp
);
return
array_join
(
ctx
,
&
array
->
dispex
,
array
->
length
,
default_separatorW
,
retv
,
ei
,
sp
);
}
}
...
...
dlls/jscript/jscript_En.rc
View file @
c168918d
...
@@ -41,4 +41,5 @@ STRINGTABLE DISCARDABLE
...
@@ -41,4 +41,5 @@ STRINGTABLE DISCARDABLE
IDS_JSCRIPT_EXPECTED "JScript 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"
IDS_ARRAY_EXPECTED "Array object expected"
}
}
dlls/jscript/resource.h
View file @
c168918d
...
@@ -37,3 +37,4 @@
...
@@ -37,3 +37,4 @@
#define IDS_JSCRIPT_EXPECTED 0x1396
#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
#define IDS_ARRAY_EXPECTED 0x13A7
dlls/jscript/tests/api.js
View file @
c168918d
...
@@ -1621,6 +1621,69 @@ exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273);
...
@@ -1621,6 +1621,69 @@ 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
testThisExcept
(
func
,
number
)
{
exception_test
(
function
()
{
func
.
call
(
new
Object
())},
"TypeError"
,
number
);
}
function
testBoolThis
(
func
)
{
testThisExcept
(
Boolean
.
prototype
[
func
],
-
2146823278
);
}
testBoolThis
(
"toString"
);
testBoolThis
(
"valueOf"
);
function
testDateThis
(
func
)
{
testThisExcept
(
Date
.
prototype
[
func
],
-
2146823282
);
}
testDateThis
(
"getDate"
);
testDateThis
(
"getDay"
);
testDateThis
(
"getFullYear"
);
testDateThis
(
"getHours"
);
testDateThis
(
"getMilliseconds"
);
testDateThis
(
"getMinutes"
);
testDateThis
(
"getMonth"
);
testDateThis
(
"getSeconds"
);
testDateThis
(
"getTime"
);
testDateThis
(
"getTimezoneOffset"
);
testDateThis
(
"getUTCDate"
);
testDateThis
(
"getUTCDay"
);
testDateThis
(
"getUTCFullYear"
);
testDateThis
(
"getUTCHours"
);
testDateThis
(
"getUTCMilliseconds"
);
testDateThis
(
"getUTCMinutes"
);
testDateThis
(
"getUTCMonth"
);
testDateThis
(
"getUTCSeconds"
);
testDateThis
(
"setDate"
);
testDateThis
(
"setFullYear"
);
testDateThis
(
"setHours"
);
testDateThis
(
"setMilliseconds"
);
testDateThis
(
"setMinutes"
);
testDateThis
(
"setMonth"
);
testDateThis
(
"setSeconds"
);
testDateThis
(
"setTime"
);
testDateThis
(
"setUTCDate"
);
testDateThis
(
"setUTCFullYear"
);
testDateThis
(
"setUTCHours"
);
testDateThis
(
"setUTCMilliseconds"
);
testDateThis
(
"setUTCMinutes"
);
testDateThis
(
"setUTCMonth"
);
testDateThis
(
"setUTCSeconds"
);
testDateThis
(
"toDateString"
);
testDateThis
(
"toLocaleDateString"
);
testDateThis
(
"toLocaleString"
);
testDateThis
(
"toLocaleTimeString"
);
testDateThis
(
"toString"
);
testDateThis
(
"toTimeString"
);
testDateThis
(
"toUTCString"
);
testDateThis
(
"valueOf"
);
function
testArrayThis
(
func
)
{
testThisExcept
(
Array
.
prototype
[
func
],
-
2146823257
);
}
testArrayThis
(
"toString"
);
function
testArrayHostThis
(
func
)
{
function
testArrayHostThis
(
func
)
{
exception_test
(
function
()
{
Array
.
prototype
[
func
].
call
(
testObj
);
},
"TypeError"
,
-
2146823274
);
exception_test
(
function
()
{
Array
.
prototype
[
func
].
call
(
testObj
);
},
"TypeError"
,
-
2146823274
);
}
}
...
...
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