JavaScriptCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 00:30:44 +0000 (00:30 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 00:30:44 +0000 (00:30 +0000)
commit49ecd19b66a0c8adcf7bf28c3af905bf7b7e9c13
tree5ae10d832ef0469c707eeaa5795f014cd6fe7e57
parent4e6430ab707fc33c2372fe1b8d143a775bbf5274
JavaScriptCore:

        Reviewed by Maciej.

        - http://bugs.webkit.org/show_bug.cgi?id=15807
          HashMap needs a take() function that combines get and remove

        * wtf/HashMap.h: Added take function. Simplistic implementation for now,
        but still does only one hash table lookup.

        * kjs/array_instance.cpp: (KJS::ArrayInstance::put): Use take rather than
        a find followed by a remove.

WebCore:

        Reviewed by Maciej.

        - use the new HashMap::take function where appropriate

        * bindings/js/kjs_binding.cpp:
        (KJS::addWrapper): Made an inline rather than a macro; inlines good, macros bad.
        (KJS::removeWrapper): Ditto.
        (KJS::removeWrappers): Ditto.
        (KJS::ScriptInterpreter::putDOMObject): Use the inline instead of the macro.
        (KJS::ScriptInterpreter::forgetDOMObject): Ditto. This involves using take instead
        of remove -- in theory ever so slightly less efficient, but I think it's fine.
        (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Ditto.
        (KJS::ScriptInterpreter::putDOMNodeForDocument): Use the inline instead of the macro.
        (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Use take instead of find/remove.
        (KJS::ScriptInterpreter::updateDOMNodeDocument): Use the inlines instead of the macros.

        * bindings/js/kjs_window.cpp: (KJS::Window::clearTimeout): Use take instead of find/remove.
        * bridge/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::remove): Ditto.
        * page/AnimationController.cpp: (WebCore::AnimationControllerPrivate::clear): Ditto.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::~RenderBlock): Ditto.
        (WebCore::RenderBlock::setDesiredColumnCountAndWidth): Ditto.
        * rendering/RootInlineBox.cpp: Ditto.(WebCore::RootInlineBox::detachEllipsisBox): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/array_instance.cpp
JavaScriptCore/wtf/HashMap.h
WebCore/ChangeLog
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/js/kjs_window.cpp
WebCore/bridge/mac/AXObjectCacheMac.mm
WebCore/page/AnimationController.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RootInlineBox.cpp