Commit fdc093dd authored by darin@chromium.org's avatar darin@chromium.org

2009-05-07 Antony Sargent <asargent@chromium.org>

        Reviewed by Darin Fisher.

        Fix a memory leak in V8EventListenerList::remove.

        https://bugs.webkit.org/show_bug.cgi?id=25618

        No new functionality so no new tests. 

        * bindings/v8/V8EventListenerList.cpp:
        (WebCore::V8EventListenerList::remove):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 560b3c9c
2009-05-07 Antony Sargent <asargent@chromium.org>
Reviewed by Darin Fisher.
Fix a memory leak in V8EventListenerList::remove.
https://bugs.webkit.org/show_bug.cgi?id=25618
No new functionality so no new tests.
* bindings/v8/V8EventListenerList.cpp:
(WebCore::V8EventListenerList::remove):
2009-05-07 Darin Fisher <darin@chromium.org>
Fix Chromium build bustage.
......@@ -147,9 +147,11 @@ void V8EventListenerList::remove(V8EventListener* listener)
for (size_t j = 0; j < vector->size(); j++) {
if (vector->at(j) == listener) {
vector->remove(j);
if (!vector->size())
if (!vector->size()) {
m_table.remove(key);
delete vector;
vector = 0;
}
m_reverseTable.remove(listener);
return;
}
......
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