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
2a228918
Commit
2a228918
authored
Oct 10, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Oct 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fill the builtin props for enumeration on prototypes as well.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
3602c676
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
dispex.c
dlls/jscript/dispex.c
+30
-18
No files found.
dlls/jscript/dispex.c
View file @
2a228918
...
...
@@ -610,15 +610,41 @@ HRESULT builtin_set_const(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
return
S_OK
;
}
static
HRESULT
fill_props
(
jsdisp_t
*
obj
)
{
dispex_prop_t
*
prop
;
HRESULT
hres
;
if
(
obj
->
builtin_info
->
idx_length
)
{
unsigned
i
=
0
,
len
=
obj
->
builtin_info
->
idx_length
(
obj
);
WCHAR
name
[
12
];
for
(
i
=
0
;
i
<
len
;
i
++
)
{
swprintf
(
name
,
ARRAY_SIZE
(
name
),
L"%u"
,
i
);
hres
=
find_prop_name
(
obj
,
string_hash
(
name
),
name
,
FALSE
,
&
prop
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
return
S_OK
;
}
static
HRESULT
fill_protrefs
(
jsdisp_t
*
This
)
{
dispex_prop_t
*
iter
,
*
prop
;
HRESULT
hres
;
hres
=
fill_props
(
This
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
This
->
prototype
)
return
S_OK
;
fill_protrefs
(
This
->
prototype
);
hres
=
fill_protrefs
(
This
->
prototype
);
if
(
FAILED
(
hres
))
return
hres
;
for
(
iter
=
This
->
prototype
->
props
;
iter
<
This
->
prototype
->
props
+
This
->
prototype
->
prop_cnt
;
iter
++
)
{
hres
=
find_prop_name
(
This
,
iter
->
hash
,
iter
->
name
,
FALSE
,
&
prop
);
...
...
@@ -2467,23 +2493,9 @@ HRESULT jsdisp_next_prop(jsdisp_t *obj, DISPID id, enum jsdisp_enum_type enum_ty
HRESULT
hres
;
if
(
id
==
DISPID_STARTENUM
)
{
if
(
obj
->
builtin_info
->
idx_length
)
{
unsigned
i
=
0
,
len
=
obj
->
builtin_info
->
idx_length
(
obj
);
WCHAR
name
[
12
];
for
(
i
=
0
;
i
<
len
;
i
++
)
{
swprintf
(
name
,
ARRAY_SIZE
(
name
),
L"%d"
,
i
);
hres
=
find_prop_name
(
obj
,
string_hash
(
name
),
name
,
FALSE
,
&
iter
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
if
(
enum_type
==
JSDISP_ENUM_ALL
)
{
hres
=
fill_protrefs
(
obj
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
(
enum_type
==
JSDISP_ENUM_ALL
)
?
fill_protrefs
(
obj
)
:
fill_props
(
obj
);
if
(
FAILED
(
hres
))
return
hres
;
idx
=
0
;
}
...
...
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