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
e4e47c01
Commit
e4e47c01
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 constructor invokation from Function object support.
parent
bea575c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
function.c
dlls/jscript/function.c
+28
-0
lang.js
dlls/jscript/tests/lang.js
+3
-0
No files found.
dlls/jscript/function.c
View file @
e4e47c01
...
...
@@ -185,6 +185,28 @@ static HRESULT invoke_function(FunctionInstance *function, LCID lcid, DISPPARAMS
return
invoke_source
(
function
,
this_obj
,
lcid
,
dp
,
retv
,
ei
,
caller
);
}
static
HRESULT
invoke_constructor
(
FunctionInstance
*
function
,
LCID
lcid
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
DispatchEx
*
this_obj
;
VARIANT
var
;
HRESULT
hres
;
hres
=
create_object
(
function
->
dispex
.
ctx
,
&
function
->
dispex
,
&
this_obj
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
invoke_source
(
function
,
(
IDispatch
*
)
_IDispatchEx_
(
this_obj
),
lcid
,
dp
,
retv
,
ei
,
caller
);
jsdisp_release
(
this_obj
);
if
(
FAILED
(
hres
))
return
hres
;
VariantClear
(
&
var
);
V_VT
(
retv
)
=
VT_DISPATCH
;
V_DISPATCH
(
retv
)
=
(
IDispatch
*
)
_IDispatchEx_
(
this_obj
);
return
S_OK
;
}
static
HRESULT
invoke_value_proc
(
FunctionInstance
*
function
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
...
...
@@ -301,6 +323,12 @@ static HRESULT Function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
return
invoke_function
(
function
,
lcid
,
dp
,
retv
,
ei
,
caller
);
case
DISPATCH_CONSTRUCT
:
if
(
function
->
value_proc
)
return
invoke_value_proc
(
function
,
lcid
,
flags
,
dp
,
retv
,
ei
,
caller
);
return
invoke_constructor
(
function
,
lcid
,
dp
,
retv
,
ei
,
caller
);
default:
FIXME
(
"not implemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
...
...
dlls/jscript/tests/lang.js
View file @
e4e47c01
...
...
@@ -79,4 +79,7 @@ ok(typeof(this) === "object", "typeof(this) is not object");
ok
(
testFunc1
(
true
,
"test"
)
===
true
,
"testFunc1 not returned true"
);
var
obj1
=
new
Object
();
ok
(
typeof
(
obj1
)
===
"object"
,
"typeof(obj1) is not object"
);
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