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
e6fc8d9b
Commit
e6fc8d9b
authored
Nov 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added disp_delete helper and use it in interp_delete_ident.
parent
6b56c65f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
11 deletions
+41
-11
dispex.c
dlls/jscript/dispex.c
+36
-0
engine.c
dlls/jscript/engine.c
+4
-11
jscript.h
dlls/jscript/jscript.h
+1
-0
No files found.
dlls/jscript/dispex.c
View file @
e6fc8d9b
...
...
@@ -1462,6 +1462,42 @@ HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)
return
delete_prop
(
prop
);
}
HRESULT
disp_delete
(
IDispatch
*
disp
,
DISPID
id
,
BOOL
*
ret
)
{
IDispatchEx
*
dispex
;
jsdisp_t
*
jsdisp
;
HRESULT
hres
;
jsdisp
=
iface_to_jsdisp
((
IUnknown
*
)
disp
);
if
(
jsdisp
)
{
dispex_prop_t
*
prop
;
*
ret
=
TRUE
;
prop
=
get_prop
(
jsdisp
,
id
);
if
(
prop
)
hres
=
delete_prop
(
prop
);
else
hres
=
DISP_E_MEMBERNOTFOUND
;
jsdisp_release
(
jsdisp
);
return
hres
;
}
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
FAILED
(
hres
))
{
*
ret
=
FALSE
;
return
S_OK
;
}
hres
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
id
);
IDispatchEx_Release
(
dispex
);
if
(
FAILED
(
hres
))
return
hres
;
*
ret
=
TRUE
;
return
S_OK
;
}
HRESULT
jsdisp_is_own_prop
(
jsdisp_t
*
obj
,
const
WCHAR
*
name
,
BOOL
*
ret
)
{
dispex_prop_t
*
prop
;
...
...
dlls/jscript/engine.c
View file @
e6fc8d9b
...
...
@@ -1648,9 +1648,8 @@ static HRESULT interp_delete(exec_ctx_t *ctx)
static
HRESULT
interp_delete_ident
(
exec_ctx_t
*
ctx
)
{
const
BSTR
arg
=
get_op_bstr
(
ctx
,
0
);
IDispatchEx
*
dispex
;
exprval_t
exprval
;
BOOL
ret
=
FALSE
;
BOOL
ret
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
...
...
@@ -1665,16 +1664,10 @@ static HRESULT interp_delete_ident(exec_ctx_t *ctx)
return
E_NOTIMPL
;
}
hres
=
IDispatch_QueryInterface
(
exprval
.
u
.
idref
.
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
hres
=
disp_delete
(
exprval
.
u
.
idref
.
disp
,
exprval
.
u
.
idref
.
id
,
&
ret
);
IDispatch_Release
(
exprval
.
u
.
idref
.
disp
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
exprval
.
u
.
idref
.
id
);
IDispatchEx_Release
(
dispex
);
if
(
FAILED
(
hres
))
return
hres
;
ret
=
TRUE
;
}
if
(
FAILED
(
hres
))
return
ret
;
return
stack_push
(
ctx
,
jsval_bool
(
ret
));
}
...
...
dlls/jscript/jscript.h
View file @
e6fc8d9b
...
...
@@ -275,6 +275,7 @@ HRESULT jsdisp_propput_idx(jsdisp_t*,DWORD,jsval_t) DECLSPEC_HIDDEN;
HRESULT
jsdisp_propget_name
(
jsdisp_t
*
,
LPCWSTR
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
,
DWORD
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_id
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
disp_delete
(
IDispatch
*
,
DISPID
,
BOOL
*
)
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
;
...
...
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