Changeset 152357 in webkit


Ignore:
Timestamp:
Jul 3, 2013 9:12:40 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Output arguments used in IPC calls should be returned initialised
https://bugs.webkit.org/show_bug.cgi?id=118354

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-03
Reviewed by Anders Carlsson.

When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
through IPC, they assume the output arguments result and allowOverwrite have
been initialised.

This patch initialises these arguments also in the unlikely event that a
m_webContext is not available.

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r152354 r152357  
     12013-07-03  Simon Pena  <simon.pena@samsung.com>
     2
     3        Output arguments used in IPC calls should be returned initialised
     4        https://bugs.webkit.org/show_bug.cgi?id=118354
     5
     6        Reviewed by Anders Carlsson.
     7
     8        When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
     9        call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
     10        through IPC, they assume the output arguments result and allowOverwrite have
     11        been initialised.
     12
     13        This patch initialises these arguments also in the unlikely event that a
     14        m_webContext is not available.
     15
     16        * UIProcess/Downloads/DownloadProxy.cpp:
     17        (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
     18        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
     19
    1202013-07-03  Sergio Villar Senin  <svillar@igalia.com>
    221
  • trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp

    r141711 r152357  
    136136void DownloadProxy::shouldDecodeSourceDataOfMIMEType(const String& mimeType, bool& result)
    137137{
     138    result = false;
     139
    138140    if (!m_webContext)
    139141        return;
     
    144146void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle)
    145147{
     148    allowOverwrite = false;
     149
    146150    if (!m_webContext)
    147151        return;
Note: See TracChangeset for help on using the changeset viewer.