[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [kdelibs/KDE/4.10] kio/kio: Always return a valid QNetworkReply instead of NULLPTR
From:       Dawit A <adawit () kde ! org>
Date:       2012-09-23 22:43:16
Message-ID: CALa28R70aynEJkX0u57D9PpSdMuCoYGL75wsLoO2OJ0Ea91oDQ () mail ! gmail ! com
[Download RAW message or body]

Did you push this fix into the 4.10 branch too ? If so, please make sure
you do not do that the next time. For kdelibs, you only need to push the
fix into the current stable branch (4.9) and someone will merge those
changes into the next stable branch (4.10).

On Sun, Sep 23, 2012 at 6:27 PM, Stefan Brüns
<stefan.bruens@rwth-aachen.de>wrote:

> Git commit 098fed426b5936069e64141d1e4ca2082c28ce19 by Stefan Brüns.
> Committed on 24/09/2012 at 00:26.
> Pushed by bruns into branch 'KDE/4.10'.
>
> Always return a valid QNetworkReply instead of NULLPTR
>
> Even when the request fails, a valid reply should be returned.
> At least WebCore crashes if the Accessmanager::createRequest(..)
> returns 0.
>
> REVIEW: 106502
> BUG: 259883
> BUG: 305516
>
> M  +1    -1    kio/kio/accessmanager.cpp
>
> http://commits.kde.org/kdelibs/098fed426b5936069e64141d1e4ca2082c28ce19
>
> diff --git a/kio/kio/accessmanager.cpp b/kio/kio/accessmanager.cpp
> index c27d90d..7a806e8 100644
> --- a/kio/kio/accessmanager.cpp
> +++ b/kio/kio/accessmanager.cpp
> @@ -332,7 +332,7 @@ QNetworkReply *AccessManager::createRequest(Operation
> op, const QNetworkRequest
>              kDebug(7044) << "Synchronous XHR:" << reply << reqUrl;
>          } else {
>              kWarning(7044) << "Failed to create a synchronous XHR for" <<
> reqUrl;
> -            reply = 0;
> +            reply = new KDEPrivate::AccessManagerReply(op, req,
> QNetworkReply::UnknownNetworkError, kioJob->errorText(), this);
>          }
>      } else {
>          // Set the window on the the KIO ui delegate
>

[Attachment #3 (text/html)]

Did you push this fix into the 4.10 branch too ? If so, please make sure you do not \
do that the next time. For kdelibs, you only need to push the fix into the current \
stable branch (4.9) and someone will merge those changes into the next stable branch \
(4.10).<br>

<br><div class="gmail_quote">
On Sun, Sep 23, 2012 at 6:27 PM, Stefan Brüns <span dir="ltr">&lt;<a \
href="mailto:stefan.bruens@rwth-aachen.de" \
target="_blank">stefan.bruens@rwth-aachen.de</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">


Git commit 098fed426b5936069e64141d1e4ca2082c28ce19 by Stefan Brüns.<br>
Committed on 24/09/2012 at 00:26.<br>
Pushed by bruns into branch &#39;KDE/4.10&#39;.<br>
<div><br>
Always return a valid QNetworkReply instead of NULLPTR<br>
<br>
Even when the request fails, a valid reply should be returned.<br>
At least WebCore crashes if the Accessmanager::createRequest(..)<br>
returns 0.<br>
<br>
REVIEW: 106502<br>
BUG: 259883<br>
BUG: 305516<br>
<br>
</div>M   +1      -1      kio/kio/accessmanager.cpp<br>
<br>
<a href="http://commits.kde.org/kdelibs/098fed426b5936069e64141d1e4ca2082c28ce19" \
target="_blank">http://commits.kde.org/kdelibs/098fed426b5936069e64141d1e4ca2082c28ce19</a><br>
 <div><div><br>
diff --git a/kio/kio/accessmanager.cpp b/kio/kio/accessmanager.cpp<br>
index c27d90d..7a806e8 100644<br>
--- a/kio/kio/accessmanager.cpp<br>
+++ b/kio/kio/accessmanager.cpp<br>
@@ -332,7 +332,7 @@ QNetworkReply *AccessManager::createRequest(Operation op, const \
                QNetworkRequest<br>
                    kDebug(7044) &lt;&lt; &quot;Synchronous XHR:&quot; &lt;&lt; reply \
&lt;&lt; reqUrl;<br>  } else {<br>
                    kWarning(7044) &lt;&lt; &quot;Failed to create a synchronous XHR \
                for&quot; &lt;&lt; reqUrl;<br>
-                  reply = 0;<br>
+                  reply = new KDEPrivate::AccessManagerReply(op, req, \
QNetworkReply::UnknownNetworkError, kioJob-&gt;errorText(), this);<br>  }<br>
        } else {<br>
              // Set the window on the the KIO ui delegate<br>
</div></div></blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic