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
f39d5e46
Commit
f39d5e46
authored
Sep 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make Array.slice generic.
parent
00644c54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
array.c
dlls/jscript/array.c
+3
-2
api.js
dlls/jscript/tests/api.js
+9
-0
No files found.
dlls/jscript/array.c
View file @
f39d5e46
...
...
@@ -456,8 +456,9 @@ static HRESULT Array_slice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
if
(
is_class
(
dispex
,
JSCLASS_ARRAY
))
{
length
=
((
ArrayInstance
*
)
dispex
)
->
length
;
}
else
{
FIXME
(
"not Array this
\n
"
);
return
E_NOTIMPL
;
hres
=
get_jsdisp_length
(
dispex
,
lcid
,
ei
,
&
length
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
arg_cnt
(
dp
))
{
...
...
dlls/jscript/tests/api.js
View file @
f39d5e46
...
...
@@ -628,6 +628,15 @@ arr[12] = 2;
ok
(
arr
.
slice
(
5
).
toString
()
===
"a,,,,,,,2"
,
"arr.slice(5).toString() = "
+
arr
.
slice
(
5
).
toString
());
ok
(
arr
.
slice
(
5
).
length
===
8
,
"arr.slice(5).length = "
+
arr
.
slice
(
5
).
length
);
obj
=
new
Object
();
obj
.
length
=
3
;
obj
[
0
]
=
1
;
obj
[
1
]
=
2
;
obj
[
2
]
=
3
;
tmp
=
Array
.
prototype
.
slice
.
call
(
obj
,
1
,
2
);
ok
(
tmp
.
length
===
1
,
"tmp.length = "
+
tmp
.
length
);
ok
(
tmp
[
0
]
===
2
,
"tmp[0] = "
+
tmp
[
0
]);
var
num
=
new
Number
(
2
);
ok
(
num
.
toString
()
===
"2"
,
"num(2).toString !== 2"
);
var
num
=
new
Number
();
...
...
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