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
8be93162
Commit
8be93162
authored
Mar 20, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Support undefined context value in Array.prototype.map.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6d69c6db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
array.c
dlls/jscript/array.c
+3
-2
es5.js
dlls/mshtml/tests/es5.js
+7
-0
No files found.
dlls/jscript/array.c
View file @
8be93162
...
...
@@ -1074,11 +1074,12 @@ static HRESULT Array_map(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned
callback
=
get_object
(
argv
[
0
]);
if
(
argc
>
1
)
{
if
(
!
is_object_instance
(
argv
[
1
])
||
!
get_object
(
argv
[
1
]))
{
if
(
is_object_instance
(
argv
[
1
])
&&
get_object
(
argv
[
1
]))
{
context_this
=
get_object
(
argv
[
1
]);
}
else
if
(
!
is_undefined
(
argv
[
1
]))
{
FIXME
(
"Unsupported context this %s
\n
"
,
debugstr_jsval
(
argv
[
1
]));
return
E_NOTIMPL
;
}
context_this
=
get_object
(
argv
[
1
]);
}
hres
=
create_array
(
ctx
,
length
,
&
array
);
...
...
dlls/mshtml/tests/es5.js
View file @
8be93162
...
...
@@ -178,6 +178,13 @@ function test_array_map() {
ok
(
calls
===
"0:1,1:3,2:5,"
,
"calls = "
+
calls
);
ok
(
m
.
join
()
===
"0,2,4"
,
"m = "
+
m
);
[
1
,
2
].
map
(
function
()
{
ok
(
this
===
window
,
"this != window"
);
});
[
1
,
2
].
map
(
function
()
{
ok
(
this
===
window
,
"this != window"
);
},
undefined
);
next_test
();
}
...
...
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