RESOLVED FIXED 121172
Stop using deleteAllValues in SVG code
https://bugs.webkit.org/show_bug.cgi?id=121172
Summary Stop using deleteAllValues in SVG code
Anders Carlsson
Reported 2013-09-11 11:25:15 PDT
Stop using deleteAllValues in SVG code
Attachments
Patch (11.20 KB, patch)
2013-09-11 11:27 PDT, Anders Carlsson
koivisto: review+
Anders Carlsson
Comment 1 2013-09-11 11:27:25 PDT
Anders Carlsson
Comment 2 2013-09-11 11:38:26 PDT
Anders Carlsson
Comment 3 2013-09-11 12:16:22 PDT
Darin Adler
Comment 4 2013-09-11 15:06:41 PDT
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.
Anders Carlsson
Comment 5 2013-09-11 15:43:40 PDT
(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.
Note You need to log in before you can comment on or make changes to this bug.