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
78652f76
Commit
78652f76
authored
Nov 05, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added propertyIsEnumerable implementation.
parent
ea34e014
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
dispex.c
dlls/jscript/dispex.c
+13
-0
jscript.h
dlls/jscript/jscript.h
+1
-0
object.c
dlls/jscript/object.c
+28
-2
No files found.
dlls/jscript/dispex.c
View file @
78652f76
...
...
@@ -1444,3 +1444,16 @@ HRESULT jsdisp_is_own_prop(jsdisp_t *obj, const WCHAR *name, BOOL *ret)
*
ret
=
prop
&&
(
prop
->
type
==
PROP_JSVAL
||
prop
->
type
==
PROP_BUILTIN
);
return
S_OK
;
}
HRESULT
jsdisp_is_enumerable
(
jsdisp_t
*
obj
,
const
WCHAR
*
name
,
BOOL
*
ret
)
{
dispex_prop_t
*
prop
;
HRESULT
hres
;
hres
=
find_prop_name
(
obj
,
string_hash
(
name
),
name
,
&
prop
);
if
(
FAILED
(
hres
))
return
hres
;
*
ret
=
prop
&&
(
prop
->
flags
&
PROPF_ENUM
)
&&
prop
->
type
!=
PROP_PROTREF
;
return
S_OK
;
}
dlls/jscript/jscript.h
View file @
78652f76
...
...
@@ -273,6 +273,7 @@ HRESULT jsdisp_get_idx(jsdisp_t*,DWORD,jsval_t*) DECLSPEC_HIDDEN;
HRESULT
jsdisp_get_id
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_delete_idx
(
jsdisp_t
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_is_own_prop
(
jsdisp_t
*
,
const
WCHAR
*
,
BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_is_enumerable
(
jsdisp_t
*
,
const
WCHAR
*
,
BOOL
*
)
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
;
...
...
dlls/jscript/object.c
View file @
78652f76
...
...
@@ -160,8 +160,34 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
static
HRESULT
Object_propertyIsEnumerable
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
jsstr_t
*
name
;
BOOL
ret
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
if
(
argc
!=
1
)
{
FIXME
(
"argc %d not supported
\n
"
,
argc
);
return
E_NOTIMPL
;
}
if
(
!
is_jsdisp
(
jsthis
))
{
FIXME
(
"Host object this
\n
"
);
return
E_FAIL
;
}
hres
=
to_string
(
ctx
,
argv
[
0
],
&
name
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_is_enumerable
(
jsthis
->
u
.
jsdisp
,
name
->
str
,
&
ret
);
jsstr_release
(
name
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
r
)
*
r
=
jsval_bool
(
ret
);
return
S_OK
;
}
static
HRESULT
Object_isPrototypeOf
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
...
...
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