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
d7e4193d
Commit
d7e4193d
authored
Jan 06, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added support for Function constructor called as a function.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c2dd4b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
function.c
dlls/jscript/function.c
+1
-0
api.js
dlls/jscript/tests/api.js
+10
-0
No files found.
dlls/jscript/function.c
View file @
d7e4193d
...
...
@@ -821,6 +821,7 @@ static HRESULT FunctionConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
DISPATCH_METHOD
:
case
DISPATCH_CONSTRUCT
:
{
IDispatch
*
ret
;
...
...
dlls/jscript/tests/api.js
View file @
d7e4193d
...
...
@@ -1869,6 +1869,16 @@ ok(tmp === undefined, "func() = " + tmp);
tmp
=
func
.
toString
();
ok
(
tmp
==
"function anonymous() {
\
n
\
n}"
,
"func.toString() = "
+
tmp
);
// Function constructor called as function
func
=
Function
(
"return 3;"
);
tmp
=
func
();
ok
(
tmp
===
3
,
"func() = "
+
tmp
);
ok
(
func
.
call
()
===
3
,
"func.call() = "
+
tmp
);
ok
(
func
.
length
===
0
,
"func.length = "
+
func
.
length
);
tmp
=
func
.
toString
();
ok
(
tmp
===
"function anonymous() {
\
nreturn 3;
\
n}"
,
"func.toString() = "
+
tmp
);
func
=
(
function
()
{
var
tmp
=
3
;
return
new
Function
(
"return tmp;"
);
...
...
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