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
f82bc09f
Commit
f82bc09f
authored
May 10, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use jsdisp_get_own_property in Object.hasOwnProperty implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
551e5a77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
22 deletions
+9
-22
dispex.c
dlls/jscript/dispex.c
+0
-13
jscript.h
dlls/jscript/jscript.h
+0
-1
object.c
dlls/jscript/object.c
+9
-8
No files found.
dlls/jscript/dispex.c
View file @
f82bc09f
...
...
@@ -1589,19 +1589,6 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t *name, BOOL
return
hres
;
}
HRESULT
jsdisp_is_own_prop
(
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
->
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
;
...
...
dlls/jscript/jscript.h
View file @
f82bc09f
...
...
@@ -294,7 +294,6 @@ HRESULT disp_delete(IDispatch*,DISPID,BOOL*) DECLSPEC_HIDDEN;
HRESULT
disp_delete_name
(
script_ctx_t
*
,
IDispatch
*
,
jsstr_t
*
,
BOOL
*
)
DECLSPEC_HIDDEN
;
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_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
,
...
...
dlls/jscript/object.c
View file @
f82bc09f
...
...
@@ -138,20 +138,21 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
return
hres
;
if
(
is_jsdisp
(
jsthis
))
{
property_desc_t
prop_desc
;
const
WCHAR
*
name_str
;
BOOL
result
;
name_str
=
jsstr_flatten
(
name
);
if
(
name_str
)
hres
=
jsdisp_is_own_prop
(
jsthis
->
u
.
jsdisp
,
name_str
,
&
result
);
else
hres
=
E_OUTOFMEMORY
;
if
(
!
name_str
)
{
jsstr_release
(
name
);
return
E_OUTOFMEMORY
;
}
hres
=
jsdisp_get_own_property
(
jsthis
->
u
.
jsdisp
,
name_str
,
TRUE
,
&
prop_desc
);
jsstr_release
(
name
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
)
&&
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
if
(
r
)
*
r
=
jsval_bool
(
result
);
if
(
r
)
*
r
=
jsval_bool
(
hres
==
S_OK
);
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