[webkit-changes] [WebKit/WebKit] 4c2ae2: Optimize layout of SecurityContext and CrossOrigin...

Simon Fraser noreply at github.com
Mon Feb 6 21:59:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4c2ae2246e14f68f1a85fbc739f1a530c9d20f05
      https://github.com/WebKit/WebKit/commit/4c2ae2246e14f68f1a85fbc739f1a530c9d20f05
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M Source/WebCore/dom/SecurityContext.h
    M Source/WebCore/loader/CrossOriginEmbedderPolicy.h
    M Source/WebCore/loader/CrossOriginOpenerPolicy.cpp
    M Source/WebCore/loader/CrossOriginOpenerPolicy.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Optimize layout of SecurityContext and CrossOriginOpenerPolicy to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251751
<rdar://problem/105049712>

Reviewed by Cameron McCormack.

SecurityContext::MixedContentType can be 8-bit.
SandboxFlags is 4 bytes, so move before the 1-byte members.
Put the two enum members next to each other in CrossOriginOpenerPolicy.

* Source/WebCore/dom/SecurityContext.h:
* Source/WebCore/loader/CrossOriginEmbedderPolicy.h:
(WebCore::operator==): Do the checks in the data member orders.
* Source/WebCore/loader/CrossOriginOpenerPolicy.cpp:
(WebCore::CrossOriginOpenerPolicy::isolatedCopy const):
(WebCore::CrossOriginOpenerPolicy::isolatedCopy):
* Source/WebCore/loader/CrossOriginOpenerPolicy.h: Put the enums next to eachother.
(WebCore::operator==):
(WebCore::CrossOriginOpenerPolicy::encode const):
(WebCore::CrossOriginOpenerPolicy::decode):

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




More information about the webkit-changes mailing list