From kde-commits Sun Sep 23 22:43:16 2012 From: Dawit A Date: Sun, 23 Sep 2012 22:43:16 +0000 To: kde-commits Subject: Re: [kdelibs/KDE/4.10] kio/kio: Always return a valid QNetworkReply instead of NULLPTR Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=134844024601962 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--f46d0447f3004cc61e04ca6635fd" --f46d0447f3004cc61e04ca6635fd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=BCns wrote: > Git commit 098fed426b5936069e64141d1e4ca2082c28ce19 by Stefan Br=C3=BCns. > 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 =3D 0; > + reply =3D new KDEPrivate::AccessManagerReply(op, req, > QNetworkReply::UnknownNetworkError, kioJob->errorText(), this); > } > } else { > // Set the window on the the KIO ui delegate > --f46d0447f3004cc61e04ca6635fd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Did you push this fix into the 4.10 branch too ? If so, please make sure yo= u 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 i= nto the next stable branch (4.10).

On Sun, Sep 23, 2012 at 6:27 PM, Stefan Br=C3=BCns <stefan.brue= ns@rwth-aachen.de> wrote:
Git commit 098fed426b5936069e64141d1e4ca2082c28ce19 by Stefan Br=C3=BCns. 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 =C2=A0+1 =C2=A0 =C2=A0-1 =C2=A0 =C2=A0kio/kio/accessmanager.cpp

http://commits.kde.org/kdelibs/098fed426b5936069= e64141d1e4ca2082c28ce19

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 o= p, const QNetworkRequest
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kDebug(7044) << "= ;Synchronous XHR:" << reply << reqUrl;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kWarning(7044) << &qu= ot;Failed to create a synchronous XHR for" << reqUrl;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reply =3D 0;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reply =3D new KDEPrivate::Access= ManagerReply(op, req, QNetworkReply::UnknownNetworkError, kioJob->errorT= ext(), this);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0// Set the window on the the KIO ui deleg= ate

--f46d0447f3004cc61e04ca6635fd--