Bug 231221

Summary: Replace document.topDocument().securityOrigin() with document.topOrigin()
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, esprehn+autocc, ews-watchlist, japhet, kangil.han, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tim Nguyen (:ntim) 2021-10-05 02:07:40 PDT
Document::topOrigin() is defined as:

SecurityOrigin& topOrigin() const final { return topDocument().securityOrigin(); }
Comment 1 Tim Nguyen (:ntim) 2021-10-05 02:26:11 PDT
Created attachment 440185 [details]
Patch
Comment 2 youenn fablet 2021-10-05 02:29:28 PDT
Comment on attachment 440185 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440185&action=review

> Source/WebCore/dom/DocumentStorageAccess.cpp:92
> +    auto& topSecurityOrigin = m_document.topOrigin();

topSecurityOrigin is only used once, can we remove this variable?

> Source/WebCore/dom/DocumentStorageAccess.cpp:162
> +    auto& topSecurityOrigin = m_document.topOrigin();

Ditto for both topSecurityOrigin and topDocument
Comment 3 Tim Nguyen (:ntim) 2021-10-05 03:01:26 PDT
Created attachment 440191 [details]
Patch
Comment 4 EWS 2021-10-05 04:00:04 PDT
Committed r283544 (242509@main): <https://commits.webkit.org/242509@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440191 [details].
Comment 5 Radar WebKit Bug Importer 2021-10-05 04:01:21 PDT
<rdar://problem/83880206>