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
e806869d
Commit
e806869d
authored
Sep 21, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added Function default value implementation.
parent
5760eb80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
function.c
dlls/jscript/function.c
+13
-0
api.js
dlls/jscript/tests/api.js
+4
-0
No files found.
dlls/jscript/function.c
View file @
e806869d
...
...
@@ -364,6 +364,19 @@ static HRESULT Function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
return
invoke_function
(
function
,
lcid
,
dp
,
retv
,
ei
,
caller
);
case
DISPATCH_PROPERTYGET
:
{
HRESULT
hres
;
BSTR
str
;
hres
=
function_to_string
(
function
,
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
retv
)
=
VT_BSTR
;
V_BSTR
(
retv
)
=
str
;
break
;
}
case
DISPATCH_CONSTRUCT
:
if
(
function
->
value_proc
)
return
invoke_value_proc
(
function
,
lcid
,
flags
,
dp
,
retv
,
ei
,
caller
);
...
...
dlls/jscript/tests/api.js
View file @
e806869d
...
...
@@ -321,6 +321,8 @@ var func = function (a) {
}.
toString
();
ok
(
func
.
toString
()
===
"function (a) {
\
n var a = 1;
\
n if(a) return;
\
n }"
,
"func.toString() = "
+
func
.
toString
());
ok
(
""
+
func
===
"function (a) {
\
n var a = 1;
\
n if(a) return;
\
n }"
,
"'' + func.toString() = "
+
func
);
function
testFuncToString
(
x
,
y
)
{
return
x
+
y
;
...
...
@@ -328,5 +330,7 @@ function testFuncToString(x,y) {
ok
(
testFuncToString
.
toString
()
===
"function testFuncToString(x,y) {
\
n return x+y;
\
n}"
,
"testFuncToString.toString() = "
+
testFuncToString
.
toString
());
ok
(
""
+
testFuncToString
===
"function testFuncToString(x,y) {
\
n return x+y;
\
n}"
,
"'' + testFuncToString = "
+
testFuncToString
);
reportSuccess
();
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