Back out Bug 589025.
authorDan Witte <dwitte@mozilla.com>
Mon, 30 Aug 2010 13:20:38 -0700
changeset 51737 921aea1613a30c09895345de328cc7d5ae5399c6
parent 51719 7652c4f2d60d0e5e14b93e2cbd74159c2acde518
child 51738 5ab5bd61c50c5ae2cc7221f628890630c58a9bb6
push id15410
push userdwitte@mozilla.com
push dateMon, 30 Aug 2010 22:36:08 +0000
treeherdermozilla-central@03e0a4afd870 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs589025
milestone2.0b5pre
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
Back out Bug 589025.
dom/ipc/PBrowser.ipdl
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
uriloader/exthandler/ExternalHelperAppParent.cpp
uriloader/exthandler/ExternalHelperAppParent.h
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -116,19 +116,17 @@ parent:
 
     PGeolocationRequest(URI uri);
 
     PContentDialog(PRUint32 aType, nsCString aName, nsCString aFeatures,
                    PRInt32[] aIntParams, nsString[] aStringParams);
 
     __delete__();
 
-    PExternalHelperApp(URI uri, nsCString aMimeContentType,
-                       nsCString aContentDisposition, bool aForceSave,
-                       PRInt64 aContentLength);
+    PExternalHelperApp(URI uri, nsCString aMimeContentType, bool aForceSave, PRInt64 aContentLength);
 
 child:
     CreateWidget(MagicWindowHandle parentWidget);
 
     LoadURL(nsCString uri);
 
     Move(PRUint32 x,
          PRUint32 y,
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -1238,17 +1238,16 @@ TabChildGlobal::GetPrincipal()
   if (!mTabChild)
     return nsnull;
   return mTabChild->GetPrincipal();
 }
 
 PExternalHelperAppChild*
 TabChild::AllocPExternalHelperApp(const IPC::URI& uri,
                                   const nsCString& aMimeContentType,
-                                  const nsCString& aContentDisposition,
                                   const bool& aForceSave,
                                   const PRInt64& aContentLength)
 {
   ExternalHelperAppChild *child = new ExternalHelperAppChild();
   child->AddRef();
   return child;
 }
 
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -222,17 +222,16 @@ public:
                                                      const nsCString&,
                                                      const nsCString&,
                                                      const nsTArray<int>&,
                                                      const nsTArray<nsString>&);
     virtual bool DeallocPContentDialog(PContentDialogChild* aDialog);
     virtual PExternalHelperAppChild *AllocPExternalHelperApp(
             const IPC::URI& uri,
             const nsCString& aMimeContentType,
-            const nsCString& aContentDisposition,
             const bool& aForceSave,
             const PRInt64& aContentLength);
     virtual bool DeallocPExternalHelperApp(PExternalHelperAppChild *aService);
     static void ParamsToArrays(nsIDialogParamBlock* aParams,
                                nsTArray<int>& aIntParams,
                                nsTArray<nsString>& aStringParams);
     static void ArraysToParams(const nsTArray<int>& aIntParams,
                                const nsTArray<nsString>& aStringParams,
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -806,23 +806,22 @@ TabParent::GetFrameLoader() const
 {
   nsCOMPtr<nsIFrameLoaderOwner> frameLoaderOwner = do_QueryInterface(mFrameElement);
   return frameLoaderOwner ? frameLoaderOwner->GetFrameLoader() : nsnull;
 }
 
 PExternalHelperAppParent*
 TabParent::AllocPExternalHelperApp(const IPC::URI& uri,
                                    const nsCString& aMimeContentType,
-                                   const nsCString& aContentDisposition,
                                    const bool& aForceSave,
                                    const PRInt64& aContentLength)
 {
   ExternalHelperAppParent *parent = new ExternalHelperAppParent(uri, aContentLength);
   parent->AddRef();
-  parent->Init(this, aMimeContentType, aContentDisposition, aForceSave);
+  parent->Init(this, aMimeContentType, aForceSave);
   return parent;
 }
 
 bool
 TabParent::DeallocPExternalHelperApp(PExternalHelperAppParent* aService)
 {
   ExternalHelperAppParent *parent = static_cast<ExternalHelperAppParent *>(aService);
   parent->Release();
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -145,17 +145,16 @@ public:
     {
       delete aDialog;
       return true;
     }
 
     virtual PExternalHelperAppParent* AllocPExternalHelperApp(
             const IPC::URI& uri,
             const nsCString& aMimeContentType,
-            const nsCString& aContentDisposition,
             const bool& aForceSave,
             const PRInt64& aContentLength);
     virtual bool DeallocPExternalHelperApp(PExternalHelperAppParent* aService);
 
     void LoadURL(nsIURI* aURI);
     void Move(PRUint32 x, PRUint32 y, PRUint32 width, PRUint32 height);
     void Activate();
     void SendMouseEvent(const nsAString& aType, float aX, float aY,
--- a/uriloader/exthandler/ExternalHelperAppParent.cpp
+++ b/uriloader/exthandler/ExternalHelperAppParent.cpp
@@ -64,31 +64,29 @@ ExternalHelperAppParent::ExternalHelperA
   , mStatus(NS_OK)
   , mContentLength(aContentLength)
 {
 }
 
 void
 ExternalHelperAppParent::Init(TabParent *parent,
                               const nsCString& aMimeContentType,
-                              const nsCString& aContentDisposition,
                               const PRBool& aForceSave)
 {
   nsHashPropertyBag::Init();
 
   NS_ASSERTION(parent, "must have a non-null TabParent");
   nsCOMPtr<nsIContent> frame = do_QueryInterface(parent->GetOwnerElement());
   nsCOMPtr<nsISupports> container = frame->GetOwnerDoc()->GetContainer();
   nsCOMPtr<nsIInterfaceRequestor> ir = do_QueryInterface(container);
 
   nsCOMPtr<nsIExternalHelperAppService> helperAppService =
     do_GetService(NS_EXTERNALHELPERAPPSERVICE_CONTRACTID);
   NS_ASSERTION(helperAppService, "No Helper App Service!");
 
-  mContentDisposition = aContentDisposition;
   helperAppService->DoContent(aMimeContentType, this, ir,
                               aForceSave, getter_AddRefs(mListener));
 }
 
 bool
 ExternalHelperAppParent::RecvOnStartRequest(const nsCString& entityID)
 {
   mEntityID = entityID;
@@ -295,17 +293,17 @@ NS_IMETHODIMP
 ExternalHelperAppParent::SetContentCharset(const nsACString& aContentCharset)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 ExternalHelperAppParent::GetContentDisposition(nsACString& aContentDisposition)
 {
-  aContentDisposition = mContentDisposition;
+  aContentDisposition.Truncate();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ExternalHelperAppParent::GetContentLength(PRInt64 *aContentLength)
 {
   *aContentLength = mContentLength;
   return NS_OK;
--- a/uriloader/exthandler/ExternalHelperAppParent.h
+++ b/uriloader/exthandler/ExternalHelperAppParent.h
@@ -64,25 +64,23 @@ public:
 
     bool RecvOnStartRequest(const nsCString& entityID);
     bool RecvOnDataAvailable(const nsCString& data, const PRUint32& offset, const PRUint32& count);
     bool RecvOnStopRequest(const nsresult& code);
     
     ExternalHelperAppParent(const IPC::URI& uri, const PRInt64& contentLength);
     void Init(TabParent *parent,
               const nsCString& aMimeContentType,
-              const nsCString& aContentDisposition,
               const PRBool& aForceSave);
     virtual ~ExternalHelperAppParent();
 
 private:
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsIURI> mURI;
   PRBool mPending;
   nsLoadFlags mLoadFlags;
   nsresult mStatus;
   PRInt64 mContentLength;
-  nsCString mContentDisposition;
   nsCString mEntityID;
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -648,33 +648,29 @@ NS_IMETHODIMP nsExternalHelperAppService
     item->GetTreeOwner(getter_AddRefs(owner));
     NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
 
     nsCOMPtr<nsITabChild> tabchild = do_GetInterface(owner);
     if (!tabchild)
       return NS_ERROR_FAILURE;
 
     PRInt64 contentLength = -1;
-    nsCString disp;
-    if (channel) {
+    if (channel)
       channel->GetContentLength(&contentLength);
-      channel->GetContentDisposition(disp);
-    }
-
 
     // Now we build a protocol for forwarding our data to the parent.  The
     // protocol will act as a listener on the child-side and create a "real"
     // helperAppService listener on the parent-side, via another call to
     // DoContent.
     using mozilla::dom::TabChild;
     using mozilla::dom::ExternalHelperAppChild;
     TabChild *child = static_cast<TabChild*>(tabchild.get());
     mozilla::dom::PExternalHelperAppChild *pc;
     pc = child->SendPExternalHelperAppConstructor(IPC::URI(uri),
-                                                  nsCString(aMimeContentType), disp,
+                                                  nsCString(aMimeContentType),
                                                   aForceSave, contentLength);
     ExternalHelperAppChild *childListener = static_cast<ExternalHelperAppChild *>(pc);
 
     NS_ADDREF(*aStreamListener = childListener);
 
     // FIXME:  Eventually we'll use this original listener to finish up client-side
     // work, such as closing a no-longer-needed window.  (Bug 588255)
     // nsExternalAppHandler * handler = new nsExternalAppHandler(nsnull,