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
10179c21
Commit
10179c21
authored
Jul 23, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Properly handle builtin properties in Object.prototype.hasOwnProperty implementation.
parent
15a83f0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
dispex.c
dlls/jscript/dispex.c
+4
-5
jscript.h
dlls/jscript/jscript.h
+1
-1
object.c
dlls/jscript/object.c
+9
-3
No files found.
dlls/jscript/dispex.c
View file @
10179c21
...
...
@@ -1388,16 +1388,15 @@ HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)
return
delete_prop
(
prop
);
}
VARIANT_BOOL
jsdisp_is_own_prop
(
jsdisp_t
*
obj
,
BSTR
name
)
HRESULT
jsdisp_is_own_prop
(
jsdisp_t
*
obj
,
BSTR
name
,
VARIANT_BOOL
*
ret
)
{
dispex_prop_t
*
prop
;
HRESULT
hres
;
hres
=
find_prop_name
(
obj
,
string_hash
(
name
),
name
,
&
prop
);
if
(
FAILED
(
hres
))
return
VARIANT_FALSE
;
else
if
(
!
prop
)
return
VARIANT_FALSE
;
return
hres
;
return
prop
->
type
==
PROP_VARIANT
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
ret
=
prop
&&
(
prop
->
type
==
PROP_VARIANT
||
prop
->
type
==
PROP_BUILTIN
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
dlls/jscript/jscript.h
View file @
10179c21
...
...
@@ -222,7 +222,7 @@ HRESULT jsdisp_propget_name(jsdisp_t*,LPCWSTR,VARIANT*,jsexcept_t*) DECLSPEC_HID
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
,
DWORD
,
VARIANT
*
,
jsexcept_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_id
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_delete_idx
(
jsdisp_t
*
,
DWORD
)
DECLSPEC_HIDDEN
;
VARIANT_BOOL
jsdisp_is_own_prop
(
jsdisp_t
*
obj
,
BSTR
name
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_is_own_prop
(
jsdisp_t
*
,
BSTR
,
VARIANT_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 @
10179c21
...
...
@@ -110,7 +110,6 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
VARIANT
*
retv
,
jsexcept_t
*
ei
)
{
BSTR
name
;
BOOL
result
;
DISPID
id
;
HRESULT
hres
;
...
...
@@ -130,14 +129,21 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
return
hres
;
if
(
is_jsdisp
(
jsthis
))
{
result
=
jsdisp_is_own_prop
(
jsthis
->
u
.
jsdisp
,
name
);
VARIANT_BOOL
result
;
hres
=
jsdisp_is_own_prop
(
jsthis
->
u
.
jsdisp
,
name
,
&
result
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
retv
)
{
V_VT
(
retv
)
=
VT_BOOL
;
V_BOOL
(
retv
)
=
result
;
}
return
S_OK
;
}
else
if
(
is_dispex
(
jsthis
))
{
}
if
(
is_dispex
(
jsthis
))
{
hres
=
IDispatchEx_GetDispID
(
jsthis
->
u
.
dispex
,
name
,
make_grfdex
(
ctx
,
fdexNameCaseSensitive
),
&
id
);
}
else
{
...
...
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