Bug 73757 - Use HashMap<unique_ptr> and Vector<unique_ptr> instead of deprecatedDeleteAllValues
Summary: Use HashMap<unique_ptr> and Vector<unique_ptr> instead of deprecatedDeleteAll...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on: 73758 73759 73778 73780 73781 73783 73784 73785 75734 96469 115652 115653 115655 115670 115678 115729 115730 115731 121082 122492 122495 122496 122499 131631
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-03 20:06 PST by Darin Adler
Modified: 2014-04-17 10:00 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.84 KB, patch)
2014-04-16 20:38 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (4.83 KB, patch)
2014-04-17 07:15 PDT, Darin Adler
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2011-12-03 20:06:01 PST
Now that HashMap works with OwnPtr mapped values, we want to go through all the sites using deleteAllValues on a HashMap and change them to use OwnPtr instead.

Once we’ve done that, we may decide to remove the deleteAllValues function.
Comment 1 Darin Adler 2013-08-20 12:45:52 PDT
Anders, did you finish the job on this? Should I mark it as resolved?
Comment 2 Anders Carlsson 2013-08-20 13:18:34 PDT
Looks like there’s a handful of uses left.
Comment 3 Darin Adler 2013-10-11 21:21:06 PDT
Here’s all that’s left:

Source/WebCore/platform/blackberry/CookieMap.cpp:    deleteAllValues(m_subdomains);
Source/WebCore/platform/network/blackberry/rss/RSSParserBase.cpp:    deleteAllValues(m_items);
Source/WebCore/platform/win/WCDataObject.cpp:    WTF::deleteAllValues(m_formats);
Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp:    deleteAllValues(m_deferredScopingWork);
Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp:    deleteAllValues(messageReceivers);
Tools/DumpRenderTree/win/DRTDataObject.cpp:    WTF::deleteAllValues(m_formats);
Tools/DumpRenderTree/win/UIDelegate.cpp:    ~DRTUndoStack() { deleteAllValues(m_undoVector); }
Tools/DumpRenderTree/win/UIDelegate.cpp:    void clear() { deleteAllValues(m_undoVector); m_undoVector.clear(); }

And then we are done.
Comment 4 Darin Adler 2014-04-13 21:31:22 PDT
We are now down to 5 uses of this. One in NPRemoteObjectMap.cpp, and the other 4 all in Windows-specific code.
Comment 5 Brent Fulgham 2014-04-13 21:58:46 PDT
(In reply to comment #4)
> We are now down to 5 uses of this. One in NPRemoteObjectMap.cpp, and the other 4 all in Windows-specific code.

I'll see about those Windows files ASAP.
Comment 6 Darin Adler 2014-04-16 20:38:49 PDT
Created attachment 229519 [details]
Patch
Comment 7 Darin Adler 2014-04-17 07:15:58 PDT
Created attachment 229542 [details]
Patch
Comment 8 Brent Fulgham 2014-04-17 09:15:06 PDT
The build failure on Windows EWS looks like the bot has a zombie build process holding onto a file. I'll ask Lucas to reboot the bot.
Comment 9 Brent Fulgham 2014-04-17 09:18:33 PDT
Comment on attachment 229542 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229542&action=review

r=me

> Source/WTF/wtf/Vector.h:-1216
> -}

Yay!
Comment 10 Darin Adler 2014-04-17 10:00:47 PDT
Committed r167432: <http://trac.webkit.org/changeset/167432>