Changeset 85117 in webkit


Ignore:
Timestamp:
Apr 27, 2011 4:06:42 PM (13 years ago)
Author:
oliver@apple.com
Message:

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:
Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp

    r81900 r85117  
    6969}
    7070
     71void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key)
     72{
     73    ExecState* exec = toJS(ctx);
     74    APIEntryShim entryShim(exec);
     75    map->map().take(key);
     76}
     77
    7178// We need to keep this function in the build to keep the nightlies running.
    7279JS_EXPORT bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef);
  • trunk/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h

    r81900 r85117  
    7777JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
    7878
     79/*!
     80 @function
     81 @abstract Removes the entry for the given key if the key is present, otherwise it has no effect.
     82 @param ctx The execution context to use.
     83 @param map The map to use.
     84 @param key The key to remove.
     85 */
     86JS_EXPORT void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
     87
    7988#ifdef __cplusplus
    8089}
  • trunk/Source/JavaScriptCore/ChangeLog

    r85084 r85117  
     12011-04-27  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Add ability to remove keys from weakmap API
     6        https://bugs.webkit.org/show_bug.cgi?id=59645
     7
     8        Add JSWeakObjectMapRemove API
     9
     10        * API/JSWeakObjectMapRefPrivate.cpp:
     11        * API/JSWeakObjectMapRefPrivate.h:
     12        * JavaScriptCore.exp:
     13
    1142011-04-27  Adam Barth  <abarth@webkit.org>
    215
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r84660 r85117  
    8888_JSWeakObjectMapCreate
    8989_JSWeakObjectMapGet
     90_JSWeakObjectMapRemove
    9091_JSWeakObjectMapSet
    9192_WTFLog
Note: See TracChangeset for help on using the changeset viewer.