⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259620 in webkit


Ignore:
Timestamp:
Apr 6, 2020, 7:16:48 PM (6 years ago)
Author:
ddkilzer@apple.com
Message:

Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs()
<https://webkit.org/b/210086>

Reviewed by Ryosuke Niwa.

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::observeParagraphs):

  • Replace WTFMove() with std::exchange() to fix the clang static analyzer warning. For WTF::Vector, this has no change in behavior.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259619 r259620  
     12020-04-06  David Kilzer  <ddkilzer@apple.com>
     2
     3        Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs()
     4        <https://webkit.org/b/210086>
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * editing/TextManipulationController.cpp:
     9        (WebCore::TextManipulationController::observeParagraphs):
     10        - Replace WTFMove() with std::exchange() to fix the clang static
     11          analyzer warning.  For WTF::Vector, this has no change in
     12          behavior.
     13
    1142020-04-06  Jack Lee  <shihchieh_lee@apple.com>
    215
  • trunk/Source/WebCore/editing/TextManipulationController.cpp

    r258525 r259620  
    305305                    startOfCurrentParagraph = Position(&textNode, offsetOfNextNewLine + 1);
    306306                }
    307                 addItem(ManipulationItemData { startOfCurrentParagraph, endOfCurrentParagraph, nullptr, nullQName(), WTFMove(tokensInCurrentParagraph) });
     307                addItem(ManipulationItemData { startOfCurrentParagraph, endOfCurrentParagraph, nullptr, nullQName(), std::exchange(tokensInCurrentParagraph, { }) });
    308308                startOfCurrentParagraph.clear();
    309309            }
Note: See TracChangeset for help on using the changeset viewer.