Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7788a48f2c2316d68a110cbbe2afb98b6fb5160e
      
https://github.com/WebKit/WebKit/commit/7788a48f2c2316d68a110cbbe2afb98b6fb5160e
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-06-29 (Mon, 29 Jun 2026)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  Cache the registrable domain string and use _s literals in 
Quirks::needsCustomUserAgentOverride
https://bugs.webkit.org/show_bug.cgi?id=318097
rdar://180889792

Reviewed by Chris Dumez.

Quirks::needsCustomUserAgentOverride() called hostDomain.string() once per
comparison and compared the result against bare const char* literals, which
take String's operator==(const char*) path (a runtime strlen plus per-byte
compare). Bind the registrable domain string once (RegistrableDomain::string()
returns a const String& reference) and compare against ASCIILiteral (_s)
operands, which carry their length and use the length-aware comparison. No
behavior change.

* Source/WebCore/page/Quirks.cpp:

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



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

Reply via email to