2011-04-27 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Add ability to remove keys from weakmap API
https://bugs.webkit.org/show_bug.cgi?id=59645
Add JSWeakObjectMapRemove API
* API/JSWeakObjectMapRefPrivate.cpp:
* API/JSWeakObjectMapRefPrivate.h:
* JavaScriptCore.exp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h
index 01e0611..5a07cf7 100644
--- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h
+++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h
@@ -76,6 +76,15 @@
*/
JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
+/*!
+ @function
+ @abstract Removes the entry for the given key if the key is present, otherwise it has no effect.
+ @param ctx The execution context to use.
+ @param map The map to use.
+ @param key The key to remove.
+ */
+JS_EXPORT void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
+
#ifdef __cplusplus
}
#endif