Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1ff4e5710003c2817eabf8eac9218787f47eda7d
https://github.com/WebKit/WebKit/commit/1ff4e5710003c2817eabf8eac9218787f47eda7d
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-06 (Sun, 06 Sep 2026)
Changed paths:
M Source/WebCore/Modules/ShapeDetection/BarcodeDetector.cpp
M Source/WebCore/Modules/ShapeDetection/DetectedBarcode.h
M Source/WebCore/Modules/ShapeDetection/DetectedText.h
M Source/WebCore/Modules/ShapeDetection/TextDetector.cpp
Log Message:
-----------
[ShapeDetection] BarcodeDetector/TextDetector copy each result String instead
of moving it
https://bugs.webkit.org/show_bug.cgi?id=323577
rdar://186820008
Reviewed by Chris Dumez.
detect() owns the Vector of results from the backing detector, but
Vector::map() invokes its functor with const T&, and convertFromBacking()
copied rawValue out of the const reference. Convert with
WTF::map(WTF::move(...)) and add an rvalue convertFromBacking() overload
that moves rawValue. Other members are type conversions that allocate
regardless. FaceDetector is unchanged (no movable String).
No change in behavior.
* Source/WebCore/Modules/ShapeDetection/BarcodeDetector.cpp:
(WebCore::BarcodeDetector::detect):
* Source/WebCore/Modules/ShapeDetection/DetectedBarcode.h:
(WebCore::convertFromBacking):
* Source/WebCore/Modules/ShapeDetection/DetectedText.h:
(WebCore::convertFromBacking):
* Source/WebCore/Modules/ShapeDetection/TextDetector.cpp:
(WebCore::TextDetector::detect):
Canonical link: https://commits.webkit.org/320604@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications