Bug 73757

Summary: Use HashMap<unique_ptr> and Vector<unique_ptr> instead of deprecatedDeleteAllValues
Product: WebKit Reporter: Darin Adler <darin>
Component: WebCore Misc.Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, bfulgham, cmarcelo, commit-queue, nick.diego
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug 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    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch bfulgham: review+

Darin Adler
Reported 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.
Attachments
Patch (4.84 KB, patch)
2014-04-16 20:38 PDT, Darin Adler
no flags
Patch (4.83 KB, patch)
2014-04-17 07:15 PDT, Darin Adler
bfulgham: review+
Darin Adler
Comment 1 2013-08-20 12:45:52 PDT
Anders, did you finish the job on this? Should I mark it as resolved?
Anders Carlsson
Comment 2 2013-08-20 13:18:34 PDT
Looks like there’s a handful of uses left.
Darin Adler
Comment 3 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.
Darin Adler
Comment 4 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.
Brent Fulgham
Comment 5 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.
Darin Adler
Comment 6 2014-04-16 20:38:49 PDT
Darin Adler
Comment 7 2014-04-17 07:15:58 PDT
Brent Fulgham
Comment 8 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.
Brent Fulgham
Comment 9 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!
Darin Adler
Comment 10 2014-04-17 10:00:47 PDT
Note You need to log in before you can comment on or make changes to this bug.