Bug 383807 - Explain why we are not checking the result of new in nsExternalProtocolHander.cpp. Patch by Ryan Jones <sciguyryan@gmail.com>. r=cbiesinger, sr=dmose
authorsdwilsh@shawnwilsher.com
Tue, 12 Jun 2007 11:31:54 -0700
changeset 2304 4e14eae6b07e063e620db0e287d33d2396130af2
parent 2303 89ae8d9892bad8a91de78a3245847b5b57dd0cd4
child 2305 8c04c56598d1f655d3f7e57cfb1d49e9388ef2dd
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscbiesinger, dmose
bugs383807
milestone1.9a6pre
Bug 383807 - Explain why we are not checking the result of new in nsExternalProtocolHander.cpp. Patch by Ryan Jones <sciguyryan@gmail.com>. r=cbiesinger, sr=dmose
uriloader/exthandler/nsExternalProtocolHandler.cpp
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -320,16 +320,18 @@ NS_IMETHODIMP nsExtProtocolChannel::Asyn
   if (NS_SUCCEEDED(rv)) {
 
     // redirecting to the web handler involvegs calling OnChannelRedirect,
     // which is supposed to happen after AsyncOpen completes, so we do it in an
     // event
     nsCOMPtr<nsIRunnable> event = new nsWebProtocolRedirect(mUrl, uriTemplate,
                                                             listener, ctxt, 
                                                             this);
+    // We don't check if |event| was successfully created because
+    // |NS_DispatchToCurrentThread| will do that for us.
     rv = NS_DispatchToCurrentThread(event);
     if (NS_SUCCEEDED(rv)) {
       return rv;
     }
   }
 
   // try for an OS-provided handler
   OpenURL();