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
0c6b804e
Commit
0c6b804e
authored
Sep 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added initial prototype of functions.
parent
b2a93fe3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
function.c
dlls/jscript/function.c
+7
-1
lang.js
dlls/jscript/tests/lang.js
+23
-0
No files found.
dlls/jscript/function.c
View file @
0c6b804e
...
...
@@ -424,11 +424,17 @@ HRESULT create_source_function(parser_ctx_t *ctx, parameter_t *parameters, sourc
scope_chain_t
*
scope_chain
,
DispatchEx
**
ret
)
{
FunctionInstance
*
function
;
DispatchEx
*
prototype
;
parameter_t
*
iter
;
DWORD
length
=
0
;
HRESULT
hres
;
hres
=
create_function
(
ctx
->
script
,
PROPF_CONSTR
,
NULL
,
&
function
);
hres
=
create_object
(
ctx
->
script
,
NULL
,
&
prototype
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_function
(
ctx
->
script
,
PROPF_CONSTR
,
prototype
,
&
function
);
jsdisp_release
(
prototype
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/tests/lang.js
View file @
0c6b804e
...
...
@@ -93,4 +93,27 @@ obj1.func = function () {
ok
(
obj1
.
func
(
true
)
===
"test"
,
"obj1.func(true) is not
\"
test
\"
"
);
function
testConstr1
()
{
this
.
var1
=
1
;
ok
(
this
!==
undefined
,
"this is undefined"
);
ok
(
arguments
.
length
===
1
,
"arguments.length is not 1"
);
ok
(
arguments
[
"0"
]
===
true
,
"arguments[0] is not 1"
);
return
false
;
}
testConstr1
.
prototype
.
pvar
=
1
;
var
obj2
=
new
testConstr1
(
true
);
ok
(
typeof
(
obj2
)
===
"object"
,
"typeof(obj2) is not object"
);
ok
(
obj2
.
pvar
===
1
,
"obj2.pvar is not 1"
);
testConstr1
.
prototype
.
pvar
=
2
;
ok
(
obj2
.
pvar
===
2
,
"obj2.pvar is not 2"
);
obj2
.
pvar
=
3
;
testConstr1
.
prototype
.
pvar
=
1
;
ok
(
obj2
.
pvar
===
3
,
"obj2.pvar is not 3"
);
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