Changeset 81900 in webkit


Ignore:
Timestamp:
Mar 24, 2011 2:44:58 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-03-24 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
https://bugs.webkit.org/show_bug.cgi?id=55671

This is no longer necessary, and it seems that with the new weakmap
model it's simply unsafe, so this reduces it to a no-op.

  • API/JSWeakObjectMapRefPrivate.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

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

    r79616 r81900  
    6969}
    7070
    71 bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object)
     71// We need to keep this function in the build to keep the nightlies running.
     72JS_EXPORT bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef);
     73bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef)
    7274{
    73     ExecState* exec = toJS(ctx);
    74     APIEntryShim entryShim(exec);
    75     JSObject* obj = toJS(object);
    76     if (map->map().deprecatedRemove(key, obj))
    77         return true;
    78     return false;
     75    return true;
    7976}
    8077
  • trunk/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h

    r79616 r81900  
    7777JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
    7878
    79 /*!
    80  @function
    81  @abstract Clears the association between a key and an object in a JSWeakObjectMapRef
    82  @param ctx The execution context to use.
    83  @param map The map to clear the key association from.
    84  @param key The key to use.
    85  @param object The old object value.
    86  @result Returns true if the key/object association was present in map, and has been removed.
    87  */
    88 JS_EXPORT bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object);
    89 
    9079#ifdef __cplusplus
    9180}
  • trunk/Source/JavaScriptCore/ChangeLog

    r81882 r81900  
     12011-03-24  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
     6        https://bugs.webkit.org/show_bug.cgi?id=55671
     7
     8        This is no longer necessary, and it seems that with the new weakmap
     9        model it's simply unsafe, so this reduces it to a no-op.
     10
     11        * API/JSWeakObjectMapRefPrivate.cpp:
     12
    1132011-03-24  Ben Taylor  <bentaylor.solx86@gmail.com>
    214
Note: See TracChangeset for help on using the changeset viewer.