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
f7915fb5
Commit
f7915fb5
authored
Apr 27, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Add Map.prototype.clear implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6cc5aa42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
set.c
dlls/jscript/set.c
+21
-2
No files found.
dlls/jscript/set.c
View file @
f7915fb5
...
...
@@ -207,11 +207,30 @@ static void release_map_entry(struct jsval_map_entry *entry)
heap_free
(
entry
);
}
static
void
delete_map_entry
(
MapInstance
*
map
,
struct
jsval_map_entry
*
entry
)
{
map
->
size
--
;
wine_rb_remove
(
&
map
->
map
,
&
entry
->
entry
);
entry
->
deleted
=
TRUE
;
release_map_entry
(
entry
);
}
static
HRESULT
Map_clear
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
FIXME
(
"%p
\n
"
,
jsthis
);
return
E_NOTIMPL
;
MapInstance
*
map
;
if
(
!
(
map
=
get_map_this
(
jsthis
)))
return
JS_E_MAP_EXPECTED
;
TRACE
(
"%p
\n
"
,
map
);
while
(
!
list_empty
(
&
map
->
entries
))
{
struct
jsval_map_entry
*
entry
=
LIST_ENTRY
(
list_head
(
&
map
->
entries
),
struct
jsval_map_entry
,
list_entry
);
delete_map_entry
(
map
,
entry
);
}
if
(
r
)
*
r
=
jsval_undefined
();
return
S_OK
;
}
static
HRESULT
Map_delete
(
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