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
9b4267b0
Commit
9b4267b0
authored
Aug 21, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Support enumerating own properties.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
25167fb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
dispex.c
dlls/jscript/dispex.c
+31
-23
jscript.h
dlls/jscript/jscript.h
+1
-0
No files found.
dlls/jscript/dispex.c
View file @
9b4267b0
...
...
@@ -870,34 +870,14 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
static
HRESULT
WINAPI
DispatchEx_GetNextDispID
(
IDispatchEx
*
iface
,
DWORD
grfdex
,
DISPID
id
,
DISPID
*
pid
)
{
jsdisp_t
*
This
=
impl_from_IDispatchEx
(
iface
);
dispex_prop_t
*
iter
;
HRESULT
hres
;
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
grfdex
,
id
,
pid
);
if
(
id
==
DISPID_STARTENUM
)
{
hres
=
fill_protrefs
(
This
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
id
+
1
>=
0
&&
id
+
1
<
This
->
prop_cnt
)
{
iter
=
&
This
->
props
[
id
+
1
];
}
else
{
hres
=
jsdisp_next_prop
(
This
,
id
,
FALSE
,
pid
);
if
(
hres
==
S_FALSE
)
*
pid
=
DISPID_STARTENUM
;
return
S_FALSE
;
}
while
(
iter
<
This
->
props
+
This
->
prop_cnt
)
{
if
(
iter
->
name
&&
(
get_flags
(
This
,
iter
)
&
PROPF_ENUMERABLE
)
&&
iter
->
type
!=
PROP_DELETED
)
{
*
pid
=
prop_to_id
(
This
,
iter
);
return
S_OK
;
}
iter
++
;
}
*
pid
=
DISPID_STARTENUM
;
return
S_FALSE
;
return
hres
;
}
static
HRESULT
WINAPI
DispatchEx_GetNameSpaceParent
(
IDispatchEx
*
iface
,
IUnknown
**
ppunk
)
...
...
@@ -1563,6 +1543,34 @@ HRESULT disp_delete(IDispatch *disp, DISPID id, BOOL *ret)
return
S_OK
;
}
HRESULT
jsdisp_next_prop
(
jsdisp_t
*
obj
,
DISPID
id
,
BOOL
own_only
,
DISPID
*
ret
)
{
dispex_prop_t
*
iter
;
HRESULT
hres
;
if
(
id
==
DISPID_STARTENUM
&&
!
own_only
)
{
hres
=
fill_protrefs
(
obj
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
id
+
1
<
0
||
id
+
1
>=
obj
->
prop_cnt
)
return
S_FALSE
;
for
(
iter
=
&
obj
->
props
[
id
+
1
];
iter
<
obj
->
props
+
obj
->
prop_cnt
;
iter
++
)
{
if
(
!
iter
->
name
||
iter
->
type
==
PROP_DELETED
)
continue
;
if
(
own_only
&&
iter
->
type
==
PROP_PROTREF
)
continue
;
if
(
!
(
get_flags
(
obj
,
iter
)
&
PROPF_ENUMERABLE
))
continue
;
*
ret
=
prop_to_id
(
obj
,
iter
);
return
S_OK
;
}
return
S_FALSE
;
}
HRESULT
disp_delete_name
(
script_ctx_t
*
ctx
,
IDispatch
*
disp
,
jsstr_t
*
name
,
BOOL
*
ret
)
{
IDispatchEx
*
dispex
;
...
...
dlls/jscript/jscript.h
View file @
9b4267b0
...
...
@@ -297,6 +297,7 @@ HRESULT jsdisp_delete_idx(jsdisp_t*,DWORD) DECLSPEC_HIDDEN;
HRESULT
jsdisp_get_own_property
(
jsdisp_t
*
,
const
WCHAR
*
,
BOOL
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_define_property
(
jsdisp_t
*
,
const
WCHAR
*
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_define_data_property
(
jsdisp_t
*
,
const
WCHAR
*
,
unsigned
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_next_prop
(
jsdisp_t
*
,
DISPID
,
BOOL
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
const
WCHAR
*
,
const
builtin_info_t
*
,
DWORD
,
jsdisp_t
*
,
jsdisp_t
**
)
DECLSPEC_HIDDEN
;
...
...
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