Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4b45526f09dc264a304ea00100b807c152205e35
      
https://github.com/WebKit/WebKit/commit/4b45526f09dc264a304ea00100b807c152205e35
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-09-13 (Sun, 13 Sep 2026)

  Changed paths:
    M Source/WebCore/platform/network/NetworkLoadMetrics.cpp

  Log Message:
  -----------
  NetworkLoadMetrics constructor copies its String&& protocol argument instead 
of moving it
https://bugs.webkit.org/show_bug.cgi?id=324053
rdar://187288152

Reviewed by Chris Dumez.

The NetworkLoadMetrics constructor takes protocol as a String&&, but the
member initializer list initialized protocol(protocol), which binds the
named rvalue reference as an lvalue and triggers a copy. Every other
by-value/by-rvalue member in the same initializer list is moved; protocol
was the lone exception.

Move the argument into the member so the caller's String is transferred
rather than atomically ref-counted and copied.

* Source/WebCore/platform/network/NetworkLoadMetrics.cpp:
(WebCore::NetworkLoadMetrics::NetworkLoadMetrics):

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



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

Reply via email to