Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c1e6bce7262a1717c3e33b20e3af11b24935480
      
https://github.com/WebKit/WebKit/commit/5c1e6bce7262a1717c3e33b20e3af11b24935480
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-12 (Sun, 12 Jul 2026)

  Changed paths:
    M Source/WebCore/html/track/WebVTTTokenizer.cpp

  Log Message:
  -----------
  [WebVTT] Move WebVTTToken into the out-parameter in 
WebVTTTokenizer::emitToken instead of copying
https://bugs.webkit.org/show_bug.cgi?id=319152
rdar://181975594

Reviewed by Chris Dumez.

emitToken() took its source token by const reference and copy-assigned it
into the result out-parameter. Every one of its call sites passes a freshly
constructed temporary (WebVTTToken::StringToken(), StartTag(), EndTag(),
TimestampTag()), so the copy performed three needless atomic reference-count
bumps per emitted token (one String plus two AtomStrings) on a value that is
immediately discarded.

Take the token by rvalue reference and move-assign it instead. No behavior
change.

* Source/WebCore/html/track/WebVTTTokenizer.cpp:
(WebCore::emitToken):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to