Title: [290287] trunk/Source
Revision
290287
Author
[email protected]
Date
2022-02-21 20:57:01 -0800 (Mon, 21 Feb 2022)

Log Message

Improve const correctness for SecurityOrigin accessors
https://bugs.webkit.org/show_bug.cgi?id=236983

Reviewed by Chris Dumez.

Source/WebCore:

* loader/SubresourceLoader.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::origin const):
(WebCore::CachedResource::origin):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::origin const):
(WebCore::CachedResourceRequest::origin):

Source/WebKit:

* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::origin const):
(WebKit::WebNotification::origin):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290286 => 290287)


--- trunk/Source/WebCore/ChangeLog	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebCore/ChangeLog	2022-02-22 04:57:01 UTC (rev 290287)
@@ -1,3 +1,18 @@
+2022-02-21  Alex Christensen  <[email protected]>
+
+        Improve const correctness for SecurityOrigin accessors
+        https://bugs.webkit.org/show_bug.cgi?id=236983
+
+        Reviewed by Chris Dumez.
+
+        * loader/SubresourceLoader.h:
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::origin const):
+        (WebCore::CachedResource::origin):
+        * loader/cache/CachedResourceRequest.h:
+        (WebCore::CachedResourceRequest::origin const):
+        (WebCore::CachedResourceRequest::origin):
+
 2022-02-21  Brandon Stewart  <[email protected]>
 
         Ensure layer has backing during traversal

Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (290286 => 290287)


--- trunk/Source/WebCore/loader/SubresourceLoader.h	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h	2022-02-22 04:57:01 UTC (rev 290287)
@@ -52,7 +52,8 @@
     CachedResource* cachedResource() const override { return m_resource; };
     WEBCORE_EXPORT const HTTPHeaderMap* originalHeaders() const;
 
-    SecurityOrigin* origin() const { return m_origin.get(); }
+    const SecurityOrigin* origin() const { return m_origin.get(); }
+    SecurityOrigin* origin() { return m_origin.get(); }
 #if PLATFORM(IOS_FAMILY)
     void startLoading() override;
 

Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (290286 => 290287)


--- trunk/Source/WebCore/loader/cache/CachedResource.h	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h	2022-02-22 04:57:01 UTC (rev 290287)
@@ -229,7 +229,8 @@
 
     void loadFrom(const CachedResource&);
 
-    SecurityOrigin* origin() const { return m_origin.get(); }
+    const SecurityOrigin* origin() const { return m_origin.get(); }
+    SecurityOrigin* origin() { return m_origin.get(); }
     AtomString initiatorName() const { return m_initiatorName; }
 
     bool canDelete() const { return !hasClients() && !m_loader && !m_preloadCount && !m_handleCount && !m_resourceToRevalidate && !m_proxyResource; }

Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.h (290286 => 290287)


--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.h	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.h	2022-02-22 04:57:01 UTC (rev 290287)
@@ -97,7 +97,8 @@
 
     void setOrigin(Ref<SecurityOrigin>&& origin) { m_origin = WTFMove(origin); }
     RefPtr<SecurityOrigin> releaseOrigin() { return WTFMove(m_origin); }
-    SecurityOrigin* origin() const { return m_origin.get(); }
+    const SecurityOrigin* origin() const { return m_origin.get(); }
+    SecurityOrigin* origin() { return m_origin.get(); }
 
     String&& releaseFragmentIdentifier() { return WTFMove(m_fragmentIdentifier); }
     void clearFragmentIdentifier() { m_fragmentIdentifier = { }; }

Modified: trunk/Source/WebKit/ChangeLog (290286 => 290287)


--- trunk/Source/WebKit/ChangeLog	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebKit/ChangeLog	2022-02-22 04:57:01 UTC (rev 290287)
@@ -1,3 +1,14 @@
+2022-02-21  Alex Christensen  <[email protected]>
+
+        Improve const correctness for SecurityOrigin accessors
+        https://bugs.webkit.org/show_bug.cgi?id=236983
+
+        Reviewed by Chris Dumez.
+
+        * UIProcess/Notifications/WebNotification.h:
+        (WebKit::WebNotification::origin const):
+        (WebKit::WebNotification::origin):
+
 2022-02-21  Wenson Hsieh  <[email protected]>
 
         [iOS] Adjust some behaviors around the "Markup Image" action in the callout bar

Modified: trunk/Source/WebKit/UIProcess/Notifications/WebNotification.h (290286 => 290287)


--- trunk/Source/WebKit/UIProcess/Notifications/WebNotification.h	2022-02-22 04:03:59 UTC (rev 290286)
+++ trunk/Source/WebKit/UIProcess/Notifications/WebNotification.h	2022-02-22 04:57:01 UTC (rev 290287)
@@ -53,8 +53,9 @@
     const String& tag() const { return m_tag; }
     const String& lang() const { return m_lang; }
     WebCore::NotificationDirection dir() const { return m_dir; }
-    API::SecurityOrigin* origin() const { return m_origin.get(); }
-    
+    const API::SecurityOrigin* origin() const { return m_origin.get(); }
+    API::SecurityOrigin* origin() { return m_origin.get(); }
+
     uint64_t notificationID() const { return identifier(); }
     const UUID& coreNotificationID() const { return m_coreNotificationID; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to