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
bea575c9
Commit
bea575c9
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 Object constructor implementation.
parent
152b3e48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
jscript.h
dlls/jscript/jscript.h
+1
-0
object.c
dlls/jscript/object.c
+42
-2
No files found.
dlls/jscript/jscript.h
View file @
bea575c9
...
...
@@ -113,6 +113,7 @@ HRESULT jsdisp_propput_idx(DispatchEx*,DWORD,LCID,VARIANT*,jsexcept_t*,IServiceP
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
DWORD
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_object
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_math
(
script_ctx_t
*
,
DispatchEx
**
);
HRESULT
to_boolean
(
VARIANT
*
,
VARIANT_BOOL
*
);
...
...
dlls/jscript/object.c
View file @
bea575c9
...
...
@@ -105,8 +105,29 @@ static const builtin_info_t Object_info = {
static
HRESULT
ObjectConstr_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
DISPATCH_CONSTRUCT
:
{
DispatchEx
*
obj
;
hres
=
create_object
(
dispex
->
ctx
,
NULL
,
&
obj
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
retv
)
=
VT_DISPATCH
;
V_DISPATCH
(
retv
)
=
(
IDispatch
*
)
_IDispatchEx_
(
obj
);
break
;
}
default:
FIXME
(
"unimplemented flags: %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
HRESULT
create_object_constr
(
script_ctx_t
*
ctx
,
DispatchEx
**
ret
)
...
...
@@ -123,3 +144,22 @@ HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx **ret)
jsdisp_release
(
object
);
return
hres
;
}
HRESULT
create_object
(
script_ctx_t
*
ctx
,
DispatchEx
*
constr
,
DispatchEx
**
ret
)
{
DispatchEx
*
object
;
HRESULT
hres
;
object
=
heap_alloc_zero
(
sizeof
(
DispatchEx
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
hres
=
init_dispex_from_constr
(
object
,
ctx
,
&
Object_info
,
constr
?
constr
:
ctx
->
object_constr
);
if
(
FAILED
(
hres
))
{
heap_free
(
object
);
return
hres
;
}
*
ret
=
object
;
return
S_OK
;
}
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