Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ea0a5456640f03ebb1b1fa4d8c93b1b45427346
      
https://github.com/WebKit/WebKit/commit/7ea0a5456640f03ebb1b1fa4d8c93b1b45427346
  Author: Darin Adler <[email protected]>
  Date:   2022-11-05 (Sat, 05 Nov 2022)

  Changed paths:
    M Source/WTF/wtf/Vector.h
    M Tools/TestWebKitAPI/Tests/WTF/Vector.cpp

  Log Message:
  -----------
  map and compactMap functions sometimes copy the passed in collection before 
mapping it to a vector
https://bugs.webkit.org/show_bug.cgi?id=247533
rdar://problem/102000000

Reviewed by Ryosuke Niwa and Tim Horton.

* Source/WTF/wtf/Vector.h:
(WTF::Mapper::map): Take const SourceType& or SourceType&&, not SourceType.
(WTF::CompactMapper::compactMap): Ditto.

* Tools/TestWebKitAPI/Tests/WTF/Vector.cpp: Added a new test, 
WTF_Vector.MapMinimalCopy.

Canonical link: https://commits.webkit.org/256373@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to