[webkit-reviews] review granted: [Bug 210086] Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs() : [Attachment 395641] Patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 6 18:07:50 PDT 2020
Ryosuke Niwa <rniwa at webkit.org> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 210086: Use-after-move of Vector<ManipulationToken> in
TextManipulationController::observeParagraphs()
https://bugs.webkit.org/show_bug.cgi?id=210086
Attachment 395641: Patch v1
https://bugs.webkit.org/attachment.cgi?id=395641&action=review
--- Comment #3 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 395641
--> https://bugs.webkit.org/attachment.cgi?id=395641
Patch v1
View in context: https://bugs.webkit.org/attachment.cgi?id=395641&action=review
> Source/WebCore/editing/TextManipulationController.cpp:307
> - addItem(ManipulationItemData { startOfCurrentParagraph,
endOfCurrentParagraph, nullptr, nullQName(), WTFMove(tokensInCurrentParagraph)
});
> + addItem(ManipulationItemData { startOfCurrentParagraph,
endOfCurrentParagraph, nullptr, nullQName(),
std::exchange(tokensInCurrentParagraph, { }) });
Huh, it's kind of annoying that we have to use std::exchange instead in this
simple case...
More information about the webkit-reviews
mailing list