Commit b566674f authored by oliver@apple.com's avatar oliver@apple.com

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:

git-svn-id: svn://svn.chromium.org/blink/trunk@81900 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9a1440a7
......@@ -68,14 +68,11 @@ JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* k
return toRef(static_cast<JSObject*>(map->map().get(key)));
}
bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object)
// We need to keep this function in the build to keep the nightlies running.
JS_EXPORT bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef);
bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef)
{
ExecState* exec = toJS(ctx);
APIEntryShim entryShim(exec);
JSObject* obj = toJS(object);
if (map->map().deprecatedRemove(key, obj))
return true;
return false;
}
#ifdef __cplusplus
......
......@@ -76,17 +76,6 @@ JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void
*/
JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key);
/*!
@function
@abstract Clears the association between a key and an object in a JSWeakObjectMapRef
@param ctx The execution context to use.
@param map The map to clear the key association from.
@param key The key to use.
@param object The old object value.
@result Returns true if the key/object association was present in map, and has been removed.
*/
JS_EXPORT bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object);
#ifdef __cplusplus
}
#endif
......
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:
2011-03-24 Ben Taylor <bentaylor.solx86@gmail.com>
Reviewed by Darin Adler.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment