Title: [260025] trunk
Revision
260025
Author
[email protected]
Date
2020-04-13 10:48:24 -0700 (Mon, 13 Apr 2020)

Log Message

Add WARN_UNUSED_RETURN to decode methods in Source/WebKit
<https://webkit.org/b/210423>
<rdar://problem/61715582>

Reviewed by Alex Christensen.

Source/WebKit:

* GPUProcess/GPUProcessCreationParameters.h:
* NetworkProcess/Downloads/DownloadID.h:
(IPC::ArgumentCoder<WebKit::DownloadID>::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::DataKey::decode):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::decodeRecordHeader):
* Platform/SharedMemory.h:
* PluginProcess/PluginCreationParameters.h:
* Shared/API/APIData.h:
* Shared/API/APIError.h:
* Shared/API/APIFrameHandle.h:
* Shared/API/APIGeometry.h:
* Shared/API/APINumber.h:
(API::Number::decode):
* Shared/API/APIPageGroupHandle.h:
* Shared/API/APIPageHandle.h:
* Shared/API/APIURL.h:
(API::URL::decode):
* Shared/API/APIURLRequest.h:
* Shared/API/APIURLResponse.h:
* Shared/API/Cocoa/RemoteObjectInvocation.h:
* Shared/Cocoa/ArgumentCodersCocoa.h:
* Shared/ContextMenuContextData.h:
* Shared/Databases/IndexedDB/WebIDBResult.h:
* Shared/EditorState.h:
* Shared/FocusedElementInformation.h:
* Shared/FontInfo.h:
* Shared/LayerTreeContext.h:
* Shared/LoadParameters.h:
* Shared/OptionalCallbackID.h:
(WebKit::OptionalCallbackID::decode):
* Shared/PlatformPopupMenuData.h:
* Shared/Plugins/PluginProcessCreationParameters.h:
* Shared/PrintInfo.h:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
* Shared/SessionState.h:
* Shared/ShareableBitmap.h:
* Shared/ShareableResource.h:
* Shared/TouchBarMenuData.h:
* Shared/UpdateInfo.h:
* Shared/VisibleContentRectUpdateInfo.h:
* Shared/WebEvent.h:
* Shared/WebHitTestResultData.h:
* Shared/WebNavigationDataStore.h:
(WebKit::WebNavigationDataStore::decode):
* Shared/WebPreferencesStore.h:
* Shared/WebProcessCreationParameters.h:
* Shared/WebsiteData/WebsiteData.h:
* Shared/cf/ArgumentCodersCF.h:
* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::decodeImage):
(IPC::decodeGKeyFile):
* Shared/gtk/ArgumentCodersGtk.h:
* Shared/gtk/WebSelectionData.h:
* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationRequest.h:
* Shared/mac/ColorSpaceData.h:
* Shared/mac/ObjCObjectGraph.h:
* Shared/mac/SecItemRequestData.h:
* Shared/mac/WebGestureEvent.h:
* UIProcess/Cocoa/SessionStateCoding.h:
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntryData):
(WebKit::decodeSessionHistoryEntry):
(WebKit::decodeSessionHistoryEntries):
(WebKit::decodeV0SessionHistory):
(WebKit::decodeV1SessionHistory):
(WebKit::decodeSessionHistory):
* WebProcess/GPU/GPUProcessConnectionInfo.h:
(WebKit::GPUProcessConnectionInfo::decode):
* WebProcess/GPU/media/RemoteAudioBusData.h:
(WebKit::RemoteAudioBusData::decode):
* WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:
* WebProcess/Network/NetworkProcessConnectionInfo.h:
(WebKit::NetworkProcessConnectionInfo::decode):
* WebProcess/Plugins/Plugin.h:
- Add WARN_UNUSED_RETURN to all decode functions.

Tools:

* Scripts/webkitpy/style/checkers/cpp.py:
(check_function_definition):
- Add check for platformDecode() methods.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest):
- Add tests for platformDecode() methods.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (260024 => 260025)


--- trunk/Source/WebKit/ChangeLog	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/ChangeLog	2020-04-13 17:48:24 UTC (rev 260025)
@@ -1,3 +1,96 @@
+2020-04-13  David Kilzer  <[email protected]>
+
+        Add WARN_UNUSED_RETURN to decode methods in Source/WebKit
+        <https://webkit.org/b/210423>
+        <rdar://problem/61715582>
+
+        Reviewed by Alex Christensen.
+
+        * GPUProcess/GPUProcessCreationParameters.h:
+        * NetworkProcess/Downloads/DownloadID.h:
+        (IPC::ArgumentCoder<WebKit::DownloadID>::decode):
+        * NetworkProcess/NetworkProcessCreationParameters.h:
+        * NetworkProcess/cache/NetworkCacheKey.h:
+        (WebKit::NetworkCache::DataKey::decode):
+        * NetworkProcess/cache/NetworkCacheStorage.cpp:
+        (WebKit::NetworkCache::decodeRecordMetaData):
+        (WebKit::NetworkCache::decodeRecordHeader):
+        * Platform/SharedMemory.h:
+        * PluginProcess/PluginCreationParameters.h:
+        * Shared/API/APIData.h:
+        * Shared/API/APIError.h:
+        * Shared/API/APIFrameHandle.h:
+        * Shared/API/APIGeometry.h:
+        * Shared/API/APINumber.h:
+        (API::Number::decode):
+        * Shared/API/APIPageGroupHandle.h:
+        * Shared/API/APIPageHandle.h:
+        * Shared/API/APIURL.h:
+        (API::URL::decode):
+        * Shared/API/APIURLRequest.h:
+        * Shared/API/APIURLResponse.h:
+        * Shared/API/Cocoa/RemoteObjectInvocation.h:
+        * Shared/Cocoa/ArgumentCodersCocoa.h:
+        * Shared/ContextMenuContextData.h:
+        * Shared/Databases/IndexedDB/WebIDBResult.h:
+        * Shared/EditorState.h:
+        * Shared/FocusedElementInformation.h:
+        * Shared/FontInfo.h:
+        * Shared/LayerTreeContext.h:
+        * Shared/LoadParameters.h:
+        * Shared/OptionalCallbackID.h:
+        (WebKit::OptionalCallbackID::decode):
+        * Shared/PlatformPopupMenuData.h:
+        * Shared/Plugins/PluginProcessCreationParameters.h:
+        * Shared/PrintInfo.h:
+        * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
+        * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
+        * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
+        * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
+        * Shared/SessionState.h:
+        * Shared/ShareableBitmap.h:
+        * Shared/ShareableResource.h:
+        * Shared/TouchBarMenuData.h:
+        * Shared/UpdateInfo.h:
+        * Shared/VisibleContentRectUpdateInfo.h:
+        * Shared/WebEvent.h:
+        * Shared/WebHitTestResultData.h:
+        * Shared/WebNavigationDataStore.h:
+        (WebKit::WebNavigationDataStore::decode):
+        * Shared/WebPreferencesStore.h:
+        * Shared/WebProcessCreationParameters.h:
+        * Shared/WebsiteData/WebsiteData.h:
+        * Shared/cf/ArgumentCodersCF.h:
+        * Shared/gtk/ArgumentCodersGtk.cpp:
+        (IPC::decodeImage):
+        (IPC::decodeGKeyFile):
+        * Shared/gtk/ArgumentCodersGtk.h:
+        * Shared/gtk/WebSelectionData.h:
+        * Shared/ios/InteractionInformationAtPosition.h:
+        * Shared/ios/InteractionInformationRequest.h:
+        * Shared/mac/ColorSpaceData.h:
+        * Shared/mac/ObjCObjectGraph.h:
+        * Shared/mac/SecItemRequestData.h:
+        * Shared/mac/WebGestureEvent.h:
+        * UIProcess/Cocoa/SessionStateCoding.h:
+        * UIProcess/LegacySessionStateCoding.h:
+        * UIProcess/mac/LegacySessionStateCoding.cpp:
+        (WebKit::decodeSessionHistoryEntryData):
+        (WebKit::decodeSessionHistoryEntry):
+        (WebKit::decodeSessionHistoryEntries):
+        (WebKit::decodeV0SessionHistory):
+        (WebKit::decodeV1SessionHistory):
+        (WebKit::decodeSessionHistory):
+        * WebProcess/GPU/GPUProcessConnectionInfo.h:
+        (WebKit::GPUProcessConnectionInfo::decode):
+        * WebProcess/GPU/media/RemoteAudioBusData.h:
+        (WebKit::RemoteAudioBusData::decode):
+        * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:
+        * WebProcess/Network/NetworkProcessConnectionInfo.h:
+        (WebKit::NetworkProcessConnectionInfo::decode):
+        * WebProcess/Plugins/Plugin.h:
+        - Add WARN_UNUSED_RETURN to all decode functions.
+
 2020-04-13  Per Arne Vollan  <[email protected]>
 
         [iOS] Add message filtering to all iokit open rules

Modified: trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h (260024 => 260025)


--- trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -50,7 +50,7 @@
     ProcessID parentPID;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, GPUProcessCreationParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, GPUProcessCreationParameters&);
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/NetworkProcess/Downloads/DownloadID.h (260024 => 260025)


--- trunk/Source/WebKit/NetworkProcess/Downloads/DownloadID.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/NetworkProcess/Downloads/DownloadID.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -63,7 +63,7 @@
     {
         encoder << downloadID.downloadID();
     }
-    static bool decode(Decoder& decoder, WebKit::DownloadID& downloadID)
+    static WARN_UNUSED_RETURN bool decode(Decoder& decoder, WebKit::DownloadID& downloadID)
     {
         uint64_t id;
         if (!decoder.decode(id))

Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (260024 => 260025)


--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -49,7 +49,7 @@
     NetworkProcessCreationParameters();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, NetworkProcessCreationParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, NetworkProcessCreationParameters&);
 
     CacheModel cacheModel { CacheModel::DocumentViewer };
 

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheKey.h (260024 => 260025)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheKey.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheKey.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -44,7 +44,7 @@
         encoder << partition << type << identifier;
     }
 
-    template <class Decoder> static bool decode(Decoder& decoder, DataKey& dataKey)
+    template <class Decoder> static WARN_UNUSED_RETURN bool decode(Decoder& decoder, DataKey& dataKey)
     {
         return decoder.decode(dataKey.partition) && decoder.decode(dataKey.type) && decoder.decode(dataKey.identifier);
     }

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp (260024 => 260025)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp	2020-04-13 17:48:24 UTC (rev 260025)
@@ -433,7 +433,7 @@
     uint64_t headerOffset { 0 };
 };
 
-static bool decodeRecordMetaData(RecordMetaData& metaData, const Data& fileData)
+static WARN_UNUSED_RETURN bool decodeRecordMetaData(RecordMetaData& metaData, const Data& fileData)
 {
     bool success = false;
     fileData.apply([&metaData, &success](const uint8_t* data, size_t size) {
@@ -497,7 +497,7 @@
     return success;
 }
 
-static bool decodeRecordHeader(const Data& fileData, RecordMetaData& metaData, Data& headerData, const Salt& salt)
+static WARN_UNUSED_RETURN bool decodeRecordHeader(const Data& fileData, RecordMetaData& metaData, Data& headerData, const Salt& salt)
 {
     if (!decodeRecordMetaData(metaData, fileData)) {
         LOG(NetworkCacheStorage, "(NetworkProcess) meta data decode failure");

Modified: trunk/Source/WebKit/Platform/SharedMemory.h (260024 => 260025)


--- trunk/Source/WebKit/Platform/SharedMemory.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Platform/SharedMemory.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -80,7 +80,7 @@
         void clear();
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, Handle&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, Handle&);
 
 #if USE(UNIX_DOMAIN_SOCKETS)
         IPC::Attachment releaseAttachment() const;

Modified: trunk/Source/WebKit/PluginProcess/PluginCreationParameters.h (260024 => 260025)


--- trunk/Source/WebKit/PluginProcess/PluginCreationParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/PluginProcess/PluginCreationParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -43,7 +43,7 @@
     PluginCreationParameters();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, PluginCreationParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PluginCreationParameters&);
 
     // The unique ID of this plug-in instance.
     uint64_t pluginInstanceID;

Modified: trunk/Source/WebKit/Shared/API/APIData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -83,7 +83,7 @@
     IPC::DataReference dataReference() const { return IPC::DataReference(m_bytes, m_size); }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<API::Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<API::Object>&);
 
 private:
     Data(const unsigned char* bytes, size_t size, FreeDataFunction freeDataFunction, const void* context)

Modified: trunk/Source/WebKit/Shared/API/APIError.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIError.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIError.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -106,7 +106,7 @@
     const WebCore::ResourceError& platformError() const { return m_platformError; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     Error()

Modified: trunk/Source/WebKit/Shared/API/APIFrameHandle.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIFrameHandle.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIFrameHandle.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -49,7 +49,7 @@
     bool isAutoconverting() const { return m_isAutoconverting; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     const WebCore::FrameIdentifier m_frameID;

Modified: trunk/Source/WebKit/Shared/API/APIGeometry.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIGeometry.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIGeometry.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -47,7 +47,7 @@
     const WKSize& size() const { return m_size; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<API::Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<API::Object>&);
 
 private:
     explicit Size(const WKSize& size)
@@ -68,7 +68,7 @@
     const WKPoint& point() const { return m_point; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<API::Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<API::Object>&);
 
 private:
     explicit Point(const WKPoint& point)
@@ -88,7 +88,7 @@
     const WKRect& rect() const { return m_rect; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<API::Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<API::Object>&);
 
 private:
     explicit Rect(const WKRect& rect)

Modified: trunk/Source/WebKit/Shared/API/APINumber.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APINumber.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APINumber.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -47,7 +47,7 @@
         encoder << m_value;
     }
 
-    static bool decode(IPC::Decoder& decoder, RefPtr<Object>& result)
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder& decoder, RefPtr<Object>& result)
     {
         NumberType value;
         if (!decoder.decode(value))

Modified: trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -45,7 +45,7 @@
     const WebKit::WebPageGroupData& webPageGroupData() const { return m_webPageGroupData; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     explicit PageGroupHandle(WebKit::WebPageGroupData&&);

Modified: trunk/Source/WebKit/Shared/API/APIPageHandle.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIPageHandle.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIPageHandle.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -49,7 +49,7 @@
     bool isAutoconverting() const { return m_isAutoconverting; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     PageHandle(WebKit::WebPageProxyIdentifier, WebCore::PageIdentifier, bool isAutoconverting);

Modified: trunk/Source/WebKit/Shared/API/APIURL.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIURL.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIURL.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -89,7 +89,7 @@
         encoder << m_string;
     }
 
-    static bool decode(IPC::Decoder& decoder, RefPtr<Object>& result)
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder& decoder, RefPtr<Object>& result)
     {
         WTF::String string;
         if (!decoder.decode(string))

Modified: trunk/Source/WebKit/Shared/API/APIURLRequest.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIURLRequest.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIURLRequest.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -49,7 +49,7 @@
     static void setDefaultTimeoutInterval(double);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     explicit URLRequest(const WebCore::ResourceRequest&);

Modified: trunk/Source/WebKit/Shared/API/APIURLResponse.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/APIURLResponse.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/APIURLResponse.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -47,7 +47,7 @@
     const WebCore::ResourceResponse& resourceResponse() const { return m_response; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
 
 private:
     explicit URLResponse(const WebCore::ResourceResponse&);

Modified: trunk/Source/WebKit/Shared/API/Cocoa/RemoteObjectInvocation.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/API/Cocoa/RemoteObjectInvocation.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/API/Cocoa/RemoteObjectInvocation.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -58,7 +58,7 @@
     const ReplyInfo* replyInfo() const { return m_replyInfo.get(); }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RemoteObjectInvocation&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RemoteObjectInvocation&);
 
 private:
     String m_interfaceIdentifier;

Modified: trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -37,7 +37,7 @@
 template<typename T> using IsObjCObject = std::enable_if_t<std::is_convertible<T *, id>::value, T *>;
 
 template<typename T, typename = IsObjCObject<T>> void encode(Encoder&, T *);
-template<typename T, typename = IsObjCObject<T>> bool decode(Decoder&, RetainPtr<T>&, NSArray<Class> *allowedClasses = @[ [T class] ]);
+template<typename T, typename = IsObjCObject<T>> WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<T>&, NSArray<Class> *allowedClasses = @[ [T class] ]);
 template<typename T, typename = IsObjCObject<T>> Optional<RetainPtr<T>> decode(Decoder&, NSArray<Class> *allowedClasses = @[ [T class] ]);
 template<typename T, typename = IsObjCObject<T>> Optional<RetainPtr<T>> decode(Decoder&, Class allowedClass);
 

Modified: trunk/Source/WebKit/Shared/ContextMenuContextData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/ContextMenuContextData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/ContextMenuContextData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -80,7 +80,7 @@
 #endif
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, ContextMenuContextData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, ContextMenuContextData&);
 
 private:
     Type m_type;

Modified: trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -58,7 +58,7 @@
     const SandboxExtension::HandleArray& handles() const { return m_handles; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebIDBResult&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebIDBResult&);
 
 private:
     WebCore::IDBResultData m_resultData;

Modified: trunk/Source/WebKit/Shared/EditorState.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/EditorState.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/EditorState.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -133,7 +133,7 @@
         bool canPaste { false };
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, PostLayoutData&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PostLayoutData&);
     };
 
     const PostLayoutData& postLayoutData() const;
@@ -140,7 +140,7 @@
     PostLayoutData& postLayoutData();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, EditorState&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, EditorState&);
 
 private:
     PostLayoutData m_postLayoutData;

Modified: trunk/Source/WebKit/Shared/FocusedElementInformation.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/FocusedElementInformation.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/FocusedElementInformation.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -149,7 +149,7 @@
     FocusedElementIdentifier focusedElementIdentifier { 0 };
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, FocusedElementInformation&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, FocusedElementInformation&);
 };
 #endif
 

Modified: trunk/Source/WebKit/Shared/FontInfo.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/FontInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/FontInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -39,7 +39,7 @@
     
 struct FontInfo {
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, FontInfo&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, FontInfo&);
     
 #if PLATFORM(COCOA)
     RetainPtr<CFDictionaryRef> fontAttributeDictionary;

Modified: trunk/Source/WebKit/Shared/LayerTreeContext.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/LayerTreeContext.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/LayerTreeContext.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -48,7 +48,7 @@
     ~LayerTreeContext();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, LayerTreeContext&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, LayerTreeContext&);
 
     bool isEmpty() const;
 

Modified: trunk/Source/WebKit/Shared/LoadParameters.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/LoadParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/LoadParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -44,10 +44,10 @@
 
 struct LoadParameters {
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, LoadParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, LoadParameters&);
 
     void platformEncode(IPC::Encoder&) const;
-    static bool platformDecode(IPC::Decoder&, LoadParameters&);
+    static WARN_UNUSED_RETURN bool platformDecode(IPC::Decoder&, LoadParameters&);
 
     uint64_t navigationID;
 

Modified: trunk/Source/WebKit/Shared/OptionalCallbackID.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/OptionalCallbackID.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/OptionalCallbackID.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -73,7 +73,7 @@
         encoder << m_id;
     }
 
-    template<class Decoder> static bool decode(Decoder& decoder, OptionalCallbackID& callbackID)
+    template<class Decoder> static WARN_UNUSED_RETURN bool decode(Decoder& decoder, OptionalCallbackID& callbackID)
     {
         auto result = decoder.decode(callbackID.m_id);
         RELEASE_ASSERT(callbackID.isValid());

Modified: trunk/Source/WebKit/Shared/PlatformPopupMenuData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/PlatformPopupMenuData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/PlatformPopupMenuData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -41,7 +41,7 @@
     PlatformPopupMenuData() = default;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, PlatformPopupMenuData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PlatformPopupMenuData&);
     static Optional<PlatformPopupMenuData> decode(IPC::Decoder&);
 
 #if PLATFORM(COCOA)

Modified: trunk/Source/WebKit/Shared/Plugins/PluginProcessCreationParameters.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/Plugins/PluginProcessCreationParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/Plugins/PluginProcessCreationParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -45,7 +45,7 @@
     PluginProcessCreationParameters();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, PluginProcessCreationParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PluginProcessCreationParameters&);
 
     PluginProcessType processType;
     bool supportsAsynchronousPluginInitialization;

Modified: trunk/Source/WebKit/Shared/PrintInfo.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/PrintInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/PrintInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -73,7 +73,7 @@
 #endif
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, PrintInfo&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PrintInfo&);
 };
 
 }

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -69,7 +69,7 @@
     void applyBackingStoreToLayer(CALayer *, LayerContentsType);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RemoteLayerBackingStore&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RemoteLayerBackingStore&);
 
     void enumerateRectsBeingDrawn(WebCore::GraphicsContext&, void (^)(WebCore::FloatRect));
 

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -117,7 +117,7 @@
         LayerProperties(const LayerProperties& other);
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, LayerProperties&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, LayerProperties&);
 
         void notePropertiesChanged(OptionSet<LayerChange> changeFlags)
         {
@@ -183,7 +183,7 @@
     RemoteLayerTreeTransaction& operator=(RemoteLayerTreeTransaction&&);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RemoteLayerTreeTransaction&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RemoteLayerTreeTransaction&);
 
     WebCore::GraphicsLayer::PlatformLayerID rootLayerID() const { return m_rootLayerID; }
     void setRootLayerID(WebCore::GraphicsLayer::PlatformLayerID);

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp (260024 => 260025)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2020-04-13 17:48:24 UTC (rev 260025)
@@ -50,52 +50,52 @@
 
 template<> struct ArgumentCoder<ScrollingStateNode> {
     static void encode(Encoder&, const ScrollingStateNode&);
-    static bool decode(Decoder&, ScrollingStateNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateScrollingNode> {
     static void encode(Encoder&, const ScrollingStateScrollingNode&);
-    static bool decode(Decoder&, ScrollingStateScrollingNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateScrollingNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateFrameHostingNode> {
     static void encode(Encoder&, const ScrollingStateFrameHostingNode&);
-    static bool decode(Decoder&, ScrollingStateFrameHostingNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateFrameHostingNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateFrameScrollingNode> {
     static void encode(Encoder&, const ScrollingStateFrameScrollingNode&);
-    static bool decode(Decoder&, ScrollingStateFrameScrollingNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateFrameScrollingNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateOverflowScrollingNode> {
     static void encode(Encoder&, const ScrollingStateOverflowScrollingNode&);
-    static bool decode(Decoder&, ScrollingStateOverflowScrollingNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateOverflowScrollingNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateOverflowScrollProxyNode> {
     static void encode(Encoder&, const ScrollingStateOverflowScrollProxyNode&);
-    static bool decode(Decoder&, ScrollingStateOverflowScrollProxyNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateOverflowScrollProxyNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateFixedNode> {
     static void encode(Encoder&, const ScrollingStateFixedNode&);
-    static bool decode(Decoder&, ScrollingStateFixedNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateFixedNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStateStickyNode> {
     static void encode(Encoder&, const ScrollingStateStickyNode&);
-    static bool decode(Decoder&, ScrollingStateStickyNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStateStickyNode&);
 };
 
 template<> struct ArgumentCoder<ScrollingStatePositionedNode> {
     static void encode(Encoder&, const ScrollingStatePositionedNode&);
-    static bool decode(Decoder&, ScrollingStatePositionedNode&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, ScrollingStatePositionedNode&);
 };
 
 template<> struct ArgumentCoder<RequestedScrollData> {
     static void encode(Encoder&, const RequestedScrollData&);
-    static bool decode(Decoder&, RequestedScrollData&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, RequestedScrollData&);
 };
 
 } // namespace IPC

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -42,7 +42,7 @@
     std::unique_ptr<WebCore::ScrollingStateTree>& scrollingStateTree() { return m_scrollingStateTree; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RemoteScrollingCoordinatorTransaction&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RemoteScrollingCoordinatorTransaction&);
 
 #if !defined(NDEBUG) || !LOG_DISABLED
     String description() const;
@@ -50,7 +50,7 @@
 #endif
 
 private:
-    bool decode(IPC::Decoder&);
+    WARN_UNUSED_RETURN bool decode(IPC::Decoder&);
     
     std::unique_ptr<WebCore::ScrollingStateTree> m_scrollingStateTree;
 };

Modified: trunk/Source/WebKit/Shared/SessionState.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/SessionState.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/SessionState.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -73,7 +73,7 @@
     };
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, HTTPBody&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, HTTPBody&);
 
     String contentType;
     Vector<Element> elements;
@@ -119,7 +119,7 @@
 
 struct PageState {
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, PageState&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, PageState&);
 
     String title;
     FrameState mainFrameState;

Modified: trunk/Source/WebKit/Shared/ShareableBitmap.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/ShareableBitmap.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/ShareableBitmap.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -68,7 +68,7 @@
 #endif
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, Configuration&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, Configuration&);
     };
 
     class Handle {
@@ -83,7 +83,7 @@
         void clear();
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, Handle&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, Handle&);
 
     private:
         friend class ShareableBitmap;

Modified: trunk/Source/WebKit/Shared/ShareableResource.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/ShareableResource.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/ShareableResource.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -52,7 +52,7 @@
         unsigned size() const { return m_size; }
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, Handle&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, Handle&);
 
         RefPtr<WebCore::SharedBuffer> tryWrapInSharedBuffer() const;
 

Modified: trunk/Source/WebKit/Shared/TouchBarMenuData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/TouchBarMenuData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/TouchBarMenuData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -54,7 +54,7 @@
     const Vector<TouchBarMenuItemData>& items() const { return m_items; }
     
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, TouchBarMenuData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, TouchBarMenuData&);
     
     void setID(const String& identifier) { m_id = identifier; }
     bool isPageCustomized() const { return m_isPageCustomized; }

Modified: trunk/Source/WebKit/Shared/UpdateInfo.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/UpdateInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/UpdateInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -47,7 +47,7 @@
     UpdateInfo& operator=(UpdateInfo&&) = default;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, UpdateInfo&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, UpdateInfo&);
 
     // The size of the web view.
     WebCore::IntSize viewSize;

Modified: trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -90,7 +90,7 @@
     MonotonicTime timestamp() const { return m_scrollVelocity.lastUpdateTime; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, VisibleContentRectUpdateInfo&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, VisibleContentRectUpdateInfo&);
 
     String dump() const;
 

Modified: trunk/Source/WebKit/Shared/WebEvent.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebEvent.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebEvent.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -117,7 +117,7 @@
     WebEvent(Type, OptionSet<Modifier>, WallTime timestamp);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebEvent&);
 
 private:
     uint32_t m_type;
@@ -161,7 +161,7 @@
     SyntheticClickType syntheticClickType() const { return static_cast<SyntheticClickType>(m_syntheticClickType); }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebMouseEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebMouseEvent&);
 
 private:
     static bool isMouseEventType(Type);
@@ -224,7 +224,7 @@
 #endif
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebWheelEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebWheelEvent&);
 
 private:
     static bool isWheelEventType(Type);
@@ -287,7 +287,7 @@
     bool isSystemKey() const { return m_isSystemKey; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebKeyboardEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebKeyboardEvent&);
 
     static bool isKeyboardEventType(Type);
 
@@ -414,7 +414,7 @@
     bool allTouchPointsAreReleased() const;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebTouchEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
     
 private:
     Vector<WebPlatformTouchPoint> m_touchPoints;
@@ -481,7 +481,7 @@
     bool allTouchPointsAreReleased() const;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebTouchEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebTouchEvent&);
   
 private:
     static bool isTouchEventType(Type);

Modified: trunk/Source/WebKit/Shared/WebHitTestResultData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebHitTestResultData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebHitTestResultData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -82,8 +82,8 @@
 
     void encode(IPC::Encoder&) const;
     void platformEncode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebHitTestResultData&);
-    static bool platformDecode(IPC::Decoder&, WebHitTestResultData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebHitTestResultData&);
+    static WARN_UNUSED_RETURN bool platformDecode(IPC::Decoder&, WebHitTestResultData&);
 
     WebCore::IntRect elementBoundingBoxInWindowCoordinates(const WebCore::HitTestResult&);
 };

Modified: trunk/Source/WebKit/Shared/WebNavigationDataStore.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebNavigationDataStore.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebNavigationDataStore.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -44,7 +44,7 @@
         encoder << response;
     }
 
-    static bool decode(IPC::Decoder& decoder, WebNavigationDataStore& store)
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder& decoder, WebNavigationDataStore& store)
     {
         if (!decoder.decode(store.url))
             return false;

Modified: trunk/Source/WebKit/Shared/WebPreferencesStore.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebPreferencesStore.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebPreferencesStore.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -37,7 +37,7 @@
     WebPreferencesStore();
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebPreferencesStore&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebPreferencesStore&);
 
     // NOTE: The getters in this class have non-standard names to aid in the use of the preference macros.
 

Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -71,7 +71,7 @@
     WebProcessCreationParameters& operator=(WebProcessCreationParameters&&);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebProcessCreationParameters&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebProcessCreationParameters&);
 
     String injectedBundlePath;
     SandboxExtension::Handle injectedBundlePathExtensionHandle;

Modified: trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/WebsiteData/WebsiteData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -61,7 +61,7 @@
     HashSet<String> hostNamesWithHSTSCache;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebsiteData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebsiteData&);
     static WebsiteDataProcessType ownerProcess(WebsiteDataType);
     static OptionSet<WebsiteDataType> filter(OptionSet<WebsiteDataType>, WebsiteDataProcessType);
 };

Modified: trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -41,64 +41,64 @@
 
 // CFArrayRef
 void encode(Encoder&, CFArrayRef);
-bool decode(Decoder&, RetainPtr<CFArrayRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFArrayRef>& result);
 
 // CFBooleanRef
 void encode(Encoder&, CFBooleanRef);
-bool decode(Decoder&, RetainPtr<CFBooleanRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFBooleanRef>& result);
 
 // CFDataRef
 void encode(Encoder&, CFDataRef);
-bool decode(Decoder&, RetainPtr<CFDataRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFDataRef>& result);
 
 // CFDateRef
 void encode(Encoder&, CFDateRef);
-bool decode(Decoder&, RetainPtr<CFDateRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFDateRef>& result);
 
 // CFDictionaryRef
 void encode(Encoder&, CFDictionaryRef);
-bool decode(Decoder&, RetainPtr<CFDictionaryRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFDictionaryRef>& result);
 
 // CFNumberRef
 void encode(Encoder&, CFNumberRef);
-bool decode(Decoder&, RetainPtr<CFNumberRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFNumberRef>& result);
 
 // CFStringRef
 void encode(Encoder&, CFStringRef);
-bool decode(Decoder&, RetainPtr<CFStringRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFStringRef>& result);
 
 // CFTypeRef
 void encode(Encoder&, CFTypeRef);
-bool decode(Decoder&, RetainPtr<CFTypeRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFTypeRef>& result);
 
 // CFURLRef
 void encode(Encoder&, CFURLRef);
-bool decode(Decoder&, RetainPtr<CFURLRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<CFURLRef>& result);
 
 // SecCertificateRef
 void encode(Encoder&, SecCertificateRef);
-bool decode(Decoder&, RetainPtr<SecCertificateRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<SecCertificateRef>& result);
 
 // SecIdentityRef
 void encode(Encoder&, SecIdentityRef);
-bool decode(Decoder&, RetainPtr<SecIdentityRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<SecIdentityRef>& result);
 
 #if HAVE(SEC_KEYCHAIN)
 // SecKeychainItemRef
 void encode(Encoder&, SecKeychainItemRef);
-bool decode(Decoder&, RetainPtr<SecKeychainItemRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<SecKeychainItemRef>& result);
 #endif
 
 #if HAVE(SEC_ACCESS_CONTROL)
 // SecAccessControlRef
 void encode(Encoder&, SecAccessControlRef);
-bool decode(Decoder&, RetainPtr<SecAccessControlRef>& result);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<SecAccessControlRef>& result);
 #endif
 
 #if HAVE(SEC_TRUST_SERIALIZATION)
 // SecTrustRef
 void encode(Encoder&, SecTrustRef);
-bool decode(Decoder&, RetainPtr<SecTrustRef>&);
+WARN_UNUSED_RETURN bool decode(Decoder&, RetainPtr<SecTrustRef>&);
 #endif
 
 #if PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.cpp (260024 => 260025)


--- trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.cpp	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.cpp	2020-04-13 17:48:24 UTC (rev 260025)
@@ -50,7 +50,7 @@
     encoder << handle;
 }
 
-static bool decodeImage(Decoder& decoder, RefPtr<Image>& image)
+static WARN_UNUSED_RETURN bool decodeImage(Decoder& decoder, RefPtr<Image>& image)
 {
     ShareableBitmap::Handle handle;
     if (!decoder.decode(handle))
@@ -183,7 +183,7 @@
     encoder << DataReference(reinterpret_cast<uint8_t*>(data.get()), dataSize);
 }
 
-static bool decodeGKeyFile(Decoder& decoder, GUniquePtr<GKeyFile>& keyFile)
+static WARN_UNUSED_RETURN bool decodeGKeyFile(Decoder& decoder, GUniquePtr<GKeyFile>& keyFile)
 {
     DataReference dataReference;
     if (!decoder.decode(dataReference))

Modified: trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/gtk/ArgumentCodersGtk.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -39,14 +39,14 @@
 namespace IPC {
 
 void encode(Encoder&, GtkPrintSettings*);
-bool decode(Decoder&, GRefPtr<GtkPrintSettings>&);
+WARN_UNUSED_RETURN bool decode(Decoder&, GRefPtr<GtkPrintSettings>&);
 
 void encode(Encoder&, GtkPageSetup*);
-bool decode(Decoder&, GRefPtr<GtkPageSetup>&);
+WARN_UNUSED_RETURN bool decode(Decoder&, GRefPtr<GtkPageSetup>&);
 
 template<> struct ArgumentCoder<WebCore::SelectionData> {
     static void encode(Encoder&, const WebCore::SelectionData&);
-    static bool decode(Decoder&, WebCore::SelectionData&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::SelectionData&);
 };
 
 } // namespace IPC

Modified: trunk/Source/WebKit/Shared/gtk/WebSelectionData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/gtk/WebSelectionData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/gtk/WebSelectionData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -35,7 +35,7 @@
     Ref<WebCore::SelectionData> selectionData;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebSelectionData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebSelectionData&);
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -102,7 +102,7 @@
     void mergeCompatibleOptionalInformation(const InteractionInformationAtPosition& oldInformation);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, InteractionInformationAtPosition&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, InteractionInformationAtPosition&);
 };
 
 }

Modified: trunk/Source/WebKit/Shared/ios/InteractionInformationRequest.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/ios/InteractionInformationRequest.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/ios/InteractionInformationRequest.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -55,7 +55,7 @@
     bool isApproximatelyValidForRequest(const InteractionInformationRequest&, int radius);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, InteractionInformationRequest&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, InteractionInformationRequest&);
 };
 
 }

Modified: trunk/Source/WebKit/Shared/mac/ColorSpaceData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/mac/ColorSpaceData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/mac/ColorSpaceData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -37,7 +37,7 @@
 
 struct ColorSpaceData {
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, ColorSpaceData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, ColorSpaceData&);
 
     RetainPtr<CGColorSpaceRef> cgColorSpace;
 };

Modified: trunk/Source/WebKit/Shared/mac/ObjCObjectGraph.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/mac/ObjCObjectGraph.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/mac/ObjCObjectGraph.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -55,11 +55,11 @@
     static RetainPtr<id> transform(id, const Transformer&);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, RefPtr<API::Object>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<API::Object>&);
 
 private:
     static void encode(IPC::Encoder&, id);
-    static bool decode(IPC::Decoder&, RetainPtr<id>&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RetainPtr<id>&);
 
     explicit ObjCObjectGraph(id rootObject)
         : m_rootObject(rootObject)

Modified: trunk/Source/WebKit/Shared/mac/SecItemRequestData.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/mac/SecItemRequestData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/mac/SecItemRequestData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -50,7 +50,7 @@
     SecItemRequestData(Type, CFDictionaryRef query, CFDictionaryRef attributesToMatch);
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, SecItemRequestData&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, SecItemRequestData&);
 
     Type type() const { return m_type; }
 

Modified: trunk/Source/WebKit/Shared/mac/WebGestureEvent.h (260024 => 260025)


--- trunk/Source/WebKit/Shared/mac/WebGestureEvent.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/Shared/mac/WebGestureEvent.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -60,7 +60,7 @@
     float gestureRotation() const { return m_gestureRotation; }
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, WebGestureEvent&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebGestureEvent&);
     
 private:
     bool isGestureEventType(Type) const;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/SessionStateCoding.h (260024 => 260025)


--- trunk/Source/WebKit/UIProcess/Cocoa/SessionStateCoding.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/UIProcess/Cocoa/SessionStateCoding.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -34,7 +34,7 @@
 struct SessionState;
 
 RetainPtr<NSData> encodeSessionState(const SessionState&);
-bool decodeSessionState(NSData *, SessionState&);
+WARN_UNUSED_RETURN bool decodeSessionState(NSData *, SessionState&);
 
 }
 

Modified: trunk/Source/WebKit/UIProcess/LegacySessionStateCoding.h (260024 => 260025)


--- trunk/Source/WebKit/UIProcess/LegacySessionStateCoding.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/UIProcess/LegacySessionStateCoding.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -38,7 +38,7 @@
 struct SessionState;
 
 RefPtr<API::Data> encodeLegacySessionState(const SessionState&);
-bool decodeLegacySessionState(const uint8_t* data, size_t, SessionState&);
+WARN_UNUSED_RETURN bool decodeLegacySessionState(const uint8_t* data, size_t, SessionState&);
 
 } // namespace WebKit
 

Modified: trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp (260024 => 260025)


--- trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp	2020-04-13 17:48:24 UTC (rev 260025)
@@ -960,7 +960,7 @@
 #endif
 }
 
-static bool decodeSessionHistoryEntryData(const uint8_t* buffer, size_t bufferSize, FrameState& mainFrameState)
+static WARN_UNUSED_RETURN bool decodeSessionHistoryEntryData(const uint8_t* buffer, size_t bufferSize, FrameState& mainFrameState)
 {
     HistoryEntryDataDecoder decoder { buffer, bufferSize };
 
@@ -975,12 +975,12 @@
     return decoder.finishDecoding();
 }
 
-static bool decodeSessionHistoryEntryData(CFDataRef historyEntryData, FrameState& mainFrameState)
+static WARN_UNUSED_RETURN bool decodeSessionHistoryEntryData(CFDataRef historyEntryData, FrameState& mainFrameState)
 {
     return decodeSessionHistoryEntryData(CFDataGetBytePtr(historyEntryData), static_cast<size_t>(CFDataGetLength(historyEntryData)), mainFrameState);
 }
 
-static bool decodeSessionHistoryEntry(CFDictionaryRef entryDictionary, BackForwardListItemState& backForwardListItemState)
+static WARN_UNUSED_RETURN bool decodeSessionHistoryEntry(CFDictionaryRef entryDictionary, BackForwardListItemState& backForwardListItemState)
 {
     auto title = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(entryDictionary, sessionHistoryEntryTitleKey));
     if (!title)
@@ -1018,7 +1018,7 @@
     return true;
 }
 
-static bool decodeSessionHistoryEntries(CFArrayRef entriesArray, Vector<BackForwardListItemState>& entries)
+static WARN_UNUSED_RETURN bool decodeSessionHistoryEntries(CFArrayRef entriesArray, Vector<BackForwardListItemState>& entries)
 {
     for (CFIndex i = 0, size = CFArrayGetCount(entriesArray); i < size; ++i) {
         auto entryDictionary = dynamic_cf_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(entriesArray, i));
@@ -1035,7 +1035,7 @@
     return true;
 }
 
-static bool decodeV0SessionHistory(CFDictionaryRef sessionHistoryDictionary, BackForwardListState& backForwardListState)
+static WARN_UNUSED_RETURN bool decodeV0SessionHistory(CFDictionaryRef sessionHistoryDictionary, BackForwardListState& backForwardListState)
 {
     auto currentIndexNumber = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(sessionHistoryDictionary, sessionHistoryCurrentIndexKey));
     if (!currentIndexNumber)
@@ -1071,7 +1071,7 @@
     return true;
 }
 
-static bool decodeV1SessionHistory(CFDictionaryRef sessionHistoryDictionary, BackForwardListState& backForwardListState)
+static WARN_UNUSED_RETURN bool decodeV1SessionHistory(CFDictionaryRef sessionHistoryDictionary, BackForwardListState& backForwardListState)
 {
     auto currentIndexNumber = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(sessionHistoryDictionary, sessionHistoryCurrentIndexKey));
     if (!currentIndexNumber) {
@@ -1102,7 +1102,7 @@
     return true;
 }
 
-static bool decodeSessionHistory(CFDictionaryRef backForwardListDictionary, BackForwardListState& backForwardListState)
+static WARN_UNUSED_RETURN bool decodeSessionHistory(CFDictionaryRef backForwardListDictionary, BackForwardListState& backForwardListState)
 {
     auto sessionHistoryVersionNumber = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(backForwardListDictionary, sessionHistoryVersionKey));
     if (!sessionHistoryVersionNumber) {

Modified: trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h (260024 => 260025)


--- trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -68,7 +68,7 @@
 #endif
     }
     
-    static bool decode(IPC::Decoder& decoder, GPUProcessConnectionInfo& info)
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder& decoder, GPUProcessConnectionInfo& info)
     {
         if (!decoder.decode(info.connection))
             return false;

Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioBusData.h (260024 => 260025)


--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioBusData.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioBusData.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -51,7 +51,7 @@
     }
 
     template<typename Decoder>
-    static bool decode(Decoder& decoder, RemoteAudioBusData& result)
+    static WARN_UNUSED_RETURN bool decode(Decoder& decoder, RemoteAudioBusData& result)
     {
         uint64_t framesToProcess;
         if (!decoder.decode(framesToProcess))

Modified: trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h (260024 => 260025)


--- trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -48,7 +48,7 @@
     size_t size() const;
 
     void encode(IPC::Encoder&) const;
-    static bool decode(IPC::Decoder&, MediaDeviceSandboxExtensions&);
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, MediaDeviceSandboxExtensions&);
 
 private:
     Vector<String> m_ids;

Modified: trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h (260024 => 260025)


--- trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -70,7 +70,7 @@
 #endif
     }
     
-    static bool decode(IPC::Decoder& decoder, NetworkProcessConnectionInfo& info)
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder& decoder, NetworkProcessConnectionInfo& info)
     {
         if (!decoder.decode(info.connection))
             return false;

Modified: trunk/Source/WebKit/WebProcess/Plugins/Plugin.h (260024 => 260025)


--- trunk/Source/WebKit/WebProcess/Plugins/Plugin.h	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Source/WebKit/WebProcess/Plugins/Plugin.h	2020-04-13 17:48:24 UTC (rev 260025)
@@ -93,7 +93,7 @@
 #endif
 
         void encode(IPC::Encoder&) const;
-        static bool decode(IPC::Decoder&, Parameters&);
+        static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, Parameters&);
     };
 
     // Sets the active plug-in controller and initializes the plug-in.

Modified: trunk/Tools/ChangeLog (260024 => 260025)


--- trunk/Tools/ChangeLog	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Tools/ChangeLog	2020-04-13 17:48:24 UTC (rev 260025)
@@ -1,3 +1,18 @@
+2020-04-13  David Kilzer  <[email protected]>
+
+        Add WARN_UNUSED_RETURN to decode methods in Source/WebKit
+        <https://webkit.org/b/210423>
+        <rdar://problem/61715582>
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_function_definition):
+        - Add check for platformDecode() methods.
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (CppStyleTest):
+        - Add tests for platformDecode() methods.
+
 2020-04-13  Aakash Jain  <[email protected]>
 
         [ews] Improve handling of unexpected network issues while communicating with Bugzilla

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (260024 => 260025)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2020-04-13 17:48:24 UTC (rev 260025)
@@ -1813,7 +1813,8 @@
         return
 
     # Check for decode() functions that don't have WARN_UNUSED_RETURN attribute.
-    if function_state.current_function.split('..')[-1].startswith('decode'):
+    function_name = function_state.current_function.split('..')[-1]
+    if function_name.startswith('decode') or function_name.startswith('platformDecode'):
         if file_extension == 'h' or (function_state.is_static() or function_state.is_declaration):
             if function_state.has_return_type('(auto|bool)'):
                 if not function_state.has_attribute('WARN_UNUSED_RETURN'):

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (260024 => 260025)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2020-04-13 17:45:53 UTC (rev 260024)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2020-04-13 17:48:24 UTC (rev 260025)
@@ -3035,7 +3035,17 @@
             '    {',
             warning_none)
 
+        self.perform_function_definition_check(
+            'foo.h',
+            '    static bool platformDecode(IPC::Decoder&, WebHitTestResultData&);',
+            warning_expected)
 
+        self.perform_function_definition_check(
+            'foo.h',
+            '    static WARN_UNUSED_RETURN bool platformDecode(IPC::Decoder&, WebHitTestResultData&);',
+            warning_none)
+
+
 class CleansedLinesTest(unittest.TestCase):
     def test_init(self):
         lines = ['Line 1',
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to