Bug 812203 - Ensure we don't try to set security callbacks on missing connections. r=mayhemer
authorJosh Matthews <josh@joshmatthews.net>
Sat, 17 Nov 2012 13:27:01 +0000
changeset 113621 fd7927a8baf87cb1d8c0b223c42e8fd01bb5ed9d
parent 113620 9771925bee9e964f942fb439821a9f19579adb59
child 113622 278bf5deb265a8d50fef9f5df53a239ab6e2ded8
push id23880
push userryanvm@gmail.com
push dateSun, 18 Nov 2012 13:36:46 +0000
treeherdermozilla-central@174440fca7da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs812203
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 812203 - Ensure we don't try to set security callbacks on missing connections. r=mayhemer
netwerk/protocol/http/nsAHttpConnection.h
--- a/netwerk/protocol/http/nsAHttpConnection.h
+++ b/netwerk/protocol/http/nsAHttpConnection.h
@@ -197,12 +197,13 @@ public:
     {                                                       \
     if (fwdObject)                                          \
         return (fwdObject)->Classify(newclass);             \
     }                                                       \
     int64_t BytesWritten()                                  \
     {     return fwdObject ? (fwdObject)->BytesWritten() : 0; } \
     void SetSecurityCallbacks(nsIInterfaceRequestor* aCallbacks) \
     {                                                       \
-        (fwdObject)->SetSecurityCallbacks(aCallbacks); \
+        if (fwdObject)                                      \
+            (fwdObject)->SetSecurityCallbacks(aCallbacks);  \
     }
 
 #endif // nsAHttpConnection_h__