Summary: | Stop using deleteAllValues in SVG code | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anders Carlsson <andersca> | ||||
Component: | New Bugs | Assignee: | Anders Carlsson <andersca> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, darin, dino, d-r, esprehn+autocc, fmalita, glenn, kondapallykalyan, pdr, schenney | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Anders Carlsson
2013-09-11 11:25:15 PDT
Created attachment 211333 [details]
Patch
Committed r155547: <http://trac.webkit.org/changeset/155547> Committed r155552: <http://trac.webkit.org/changeset/155552> Comment on attachment 211333 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211333&action=review > Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp:150 > + m_clipper.set(object, createOwned<ClipperData>().release()); Why release() instead of std::move? > Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:219 > + m_filter.set(object, filterData.release()); Same question. > Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:233 > + m_filter.set(object, filterData.release()); Same question.Same question. > Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:249 > + m_filter.set(object, filterData.release()); Same question.Same question. > Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp:77 > + m_masker.set(object, createOwned<MaskerData>().release()); Same question. (In reply to comment #4) > (From update of attachment 211333 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211333&action=review > > > Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp:150 > > + m_clipper.set(object, createOwned<ClipperData>().release()); > > Why release() instead of std::move? > Because you can’t currently pass a move-only type as a value to HashMap. We work around this with PassOwnPtr by using the pass traits. I hope that once we make our other collections work with move-only types we’ll be able to get rid of the pass traits. |