Bug 118354

Summary: Output arguments used in IPC calls should be returned initialised
Product: WebKit Reporter: Simon Pena <spenap>
Component: WebKit2Assignee: Simon Pena <spenap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, bdakin, commit-queue, kling, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Pena 2013-07-03 05:32:43 PDT
In bug #83683, an assertion was crashing because it was relying on certain values of two output arguments in an IPC call.

Various methods calling the function were initialising these output arguments before using them, but that's useless since they will later be simply declared as ReplyArguments and no assignment will happen that considers previous values (see HandleMessage.h). I did a grep within the source code with 

``egrep -rle 'Messages::[a-zA-Z]+::[a-zA-Z]+::Reply\([a-zA-Z]+' Source/''

which resulted in the following files.

Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp
Source/WebKit2/WebProcess/NetworkInfo/WebNetworkInfoManager.cpp
Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebInspector.cpp
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
Source/WebKit2/Shared/mac/CookieStorageShim.cpp
Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp
Source/WebKit2/Shared/Downloads/Download.cpp
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm

After the fix I proposed for the bug #83683, I think there was only one modification left coming from Source/WebKit2/Shared/Downloads/Download.cpp (patch coming now). I think all the other usages of ReplyArguments have these arguments properly initialised. (In some cases, even if no explicit assignment is done, these arguments are complex types, where their default constructors deal with a proper initialisation).
Comment 1 Simon Pena 2013-07-03 06:19:51 PDT
Created attachment 205998 [details]
Patch
Comment 2 WebKit Commit Bot 2013-07-03 09:13:24 PDT
Comment on attachment 205998 [details]
Patch

Clearing flags on attachment: 205998

Committed r152357: <http://trac.webkit.org/changeset/152357>
Comment 3 WebKit Commit Bot 2013-07-03 09:13:27 PDT
All reviewed patches have been landed.  Closing bug.