switch message handler nsresult return types to bool. appears to break test plugin, will be temporary
authorChris Jones <jones.chris.g@gmail.com>
Thu, 17 Sep 2009 18:09:20 -0500
changeset 35926 9e4f7f5a9ca3a1b7d6d8c87c412547f8765a980e
parent 35925 5814a0ca6421099412f02c014dacd9b4acf891b2
child 35927 4fe8c1c0c231cf7bec549422ad573af611e00698
push idunknown
push userunknown
push dateunknown
milestone1.9.3a1pre
switch message handler nsresult return types to bool. appears to break test plugin, will be temporary
dom/ipc/ContentProcessChild.cpp
dom/ipc/ContentProcessChild.h
dom/ipc/ContentProcessParent.cpp
dom/ipc/ContentProcessParent.h
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/plugins/BrowserStreamChild.cpp
dom/plugins/BrowserStreamChild.h
dom/plugins/BrowserStreamParent.cpp
dom/plugins/BrowserStreamParent.h
dom/plugins/PluginInstanceChild.cpp
dom/plugins/PluginInstanceChild.h
dom/plugins/PluginInstanceParent.cpp
dom/plugins/PluginInstanceParent.h
dom/plugins/PluginModuleChild.cpp
dom/plugins/PluginModuleChild.h
dom/plugins/PluginModuleParent.cpp
dom/plugins/PluginModuleParent.h
dom/plugins/PluginScriptableObjectChild.cpp
dom/plugins/PluginScriptableObjectChild.h
ipc/app/MozillaRuntimeMain.cpp
ipc/ipdl/ipdl/lower.py
ipc/test-harness/TestChild.cpp
ipc/test-harness/TestChild.h
ipc/test-harness/TestParent.cpp
ipc/test-harness/TestParent.h
ipc/testshell/TestShellChild.cpp
ipc/testshell/TestShellChild.h
ipc/testshell/TestShellParent.cpp
ipc/testshell/TestShellParent.h
netwerk/ipc/NeckoChild.cpp
netwerk/ipc/NeckoChild.h
netwerk/ipc/NeckoParent.cpp
netwerk/ipc/NeckoParent.h
netwerk/protocol/http/src/HttpChannelParent.cpp
netwerk/protocol/http/src/HttpChannelParent.h
--- a/dom/ipc/ContentProcessChild.cpp
+++ b/dom/ipc/ContentProcessChild.cpp
@@ -81,75 +81,75 @@ ContentProcessChild::PIFrameEmbeddingCon
     PIFrameEmbeddingChild* iframe = new TabChild(hwnd);
     if (iframe && mIFrames.AppendElement(iframe)) {
         return iframe;
     }
     delete iframe;
     return nsnull;
 }
 
-nsresult
+bool
 ContentProcessChild::PIFrameEmbeddingDestructor(PIFrameEmbeddingChild* iframe)
 {
     mIFrames.RemoveElement(iframe);
-    return NS_OK;
+    return true;
 }
 
 PTestShellChild*
 ContentProcessChild::PTestShellConstructor()
 {
     PTestShellChild* testshell = new TestShellChild();
     if (testshell && mTestShells.AppendElement(testshell)) {
         return testshell;
     }
     delete testshell;
     return nsnull;
 }
 
-nsresult
+bool
 ContentProcessChild::PTestShellDestructor(PTestShellChild* shell)
 {
     mTestShells.RemoveElement(shell);
-    return NS_OK;
+    return true;
 }
 
 PNeckoChild* 
 ContentProcessChild::PNeckoConstructor()
 {
     return new NeckoChild();
 }
 
-nsresult 
+bool 
 ContentProcessChild::PNeckoDestructor(PNeckoChild* necko)
 {
     delete necko;
-    return NS_OK;
+    return true;
 }
 
 void
 ContentProcessChild::Quit()
 {
     NS_ASSERTION(mQuit, "Exiting uncleanly!");
     mIFrames.Clear();
     mTestShells.Clear();
 }
 
 static void
 QuitIOLoop()
 {
     MessageLoop::current()->Quit();
 }
 
-nsresult
+bool
 ContentProcessChild::RecvQuit()
 {
     mQuit = PR_TRUE;
 
     Quit();
 
     XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
                                      NewRunnableFunction(&QuitIOLoop));
 
-    return NS_OK;
+    return true;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentProcessChild.h
+++ b/dom/ipc/ContentProcessChild.h
@@ -57,26 +57,26 @@ public:
 
     static ContentProcessChild* GetSingleton() {
         NS_ASSERTION(sSingleton, "not initialized");
         return sSingleton;
     }
 
     virtual PIFrameEmbeddingChild* PIFrameEmbeddingConstructor(
             const MagicWindowHandle& hwnd);
-    virtual nsresult PIFrameEmbeddingDestructor(PIFrameEmbeddingChild*);
+    virtual bool PIFrameEmbeddingDestructor(PIFrameEmbeddingChild*);
 
     virtual PTestShellChild* PTestShellConstructor();
-    virtual nsresult PTestShellDestructor(PTestShellChild*);
+    virtual bool PTestShellDestructor(PTestShellChild*);
 
     virtual PNeckoChild* PNeckoConstructor();
-    virtual nsresult PNeckoDestructor(PNeckoChild*);
+    virtual bool PNeckoDestructor(PNeckoChild*);
 
     void Quit();
-    virtual nsresult RecvQuit();
+    virtual bool RecvQuit();
 
 private:
     static ContentProcessChild* sSingleton;
 
     nsTArray<nsAutoPtr<PIFrameEmbeddingChild> > mIFrames;
     nsTArray<nsAutoPtr<PTestShellChild> > mTestShells;
 
     PRBool mQuit;
--- a/dom/ipc/ContentProcessParent.cpp
+++ b/dom/ipc/ContentProcessParent.cpp
@@ -144,43 +144,43 @@ ContentProcessParent::OnWaitableEventSig
 
 PIFrameEmbeddingParent*
 ContentProcessParent::PIFrameEmbeddingConstructor(
         const MagicWindowHandle& parentWidget)
 {
     return new TabParent();
 }
 
-nsresult
+bool
 ContentProcessParent::PIFrameEmbeddingDestructor(PIFrameEmbeddingParent* frame)
 {
   delete frame;
-  return NS_OK;
+  return true;
 }
 
 PTestShellParent*
 ContentProcessParent::PTestShellConstructor()
 {
   return new TestShellParent();
 }
 
-nsresult
+bool
 ContentProcessParent::PTestShellDestructor(PTestShellParent* shell)
 {
   delete shell;
-  return NS_OK;
+  return true;
 }
 
 PNeckoParent* 
 ContentProcessParent::PNeckoConstructor()
 {
     return new NeckoParent();
 }
 
-nsresult 
+bool 
 ContentProcessParent::PNeckoDestructor(PNeckoParent* necko)
 {
     delete necko;
-    return NS_OK;
+    return true;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentProcessParent.h
+++ b/dom/ipc/ContentProcessParent.h
@@ -88,23 +88,23 @@ private:
     using PContentProcessParent::SendPIFrameEmbeddingConstructor;
     using PContentProcessParent::SendPTestShellConstructor;
 
     ContentProcessParent();
     virtual ~ContentProcessParent();
 
     virtual PIFrameEmbeddingParent* PIFrameEmbeddingConstructor(
             const MagicWindowHandle& parentWidget);
-    virtual nsresult PIFrameEmbeddingDestructor(PIFrameEmbeddingParent* frame);
+    virtual bool PIFrameEmbeddingDestructor(PIFrameEmbeddingParent* frame);
 
     virtual PTestShellParent* PTestShellConstructor();
-    virtual nsresult PTestShellDestructor(PTestShellParent* shell);
+    virtual bool PTestShellDestructor(PTestShellParent* shell);
 
     virtual PNeckoParent* PNeckoConstructor();
-    virtual nsresult PNeckoDestructor(PNeckoParent* necko);
+    virtual bool PNeckoDestructor(PNeckoParent* necko);
 
     mozilla::Monitor mMonitor;
 
     GeckoChildProcessHost* mSubprocess;
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -86,31 +86,31 @@ TabChild::TabChild(const MagicWindowHand
     mWebNav = do_QueryInterface(webBrowser);
 }
 
 TabChild::~TabChild()
 {
     // TODObsmedberg: destroy the window!
 }
 
-nsresult
+bool
 TabChild::RecvloadURL(const nsCString& uri)
 {
     printf("loading %s, %d\n", uri.get(), NS_IsMainThread());
 
     return mWebNav->LoadURI(NS_ConvertUTF8toUTF16(uri).get(),
                             nsIWebNavigation::LOAD_FLAGS_NONE,
                             NULL, NULL, NULL); 
 }
 
-nsresult
+bool
 TabChild::Recvmove(const PRUint32& x,
                      const PRUint32& y,
                      const PRUint32& width,
                      const PRUint32& height)
 {
     printf("[TabChild] MOVE to (x,y)=(%ud, %ud), (w,h)= (%ud, %ud)\n",
            x, y, width, height);
 
     nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(mWebNav);
     baseWin->SetPositionAndSize(x, y, width, height, PR_TRUE);
-    return NS_OK;
+    return true;
 }
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -47,21 +47,21 @@ namespace mozilla {
 namespace dom {
 
 class TabChild : public PIFrameEmbeddingChild
 {
 public:
     TabChild(const MagicWindowHandle& parentWidget);
     virtual ~TabChild();
 
-    virtual nsresult RecvloadURL(const nsCString& uri);
-    virtual nsresult Recvmove(const PRUint32& x,
-                              const PRUint32& y,
-                              const PRUint32& width,
-                              const PRUint32& height);
+    virtual bool RecvloadURL(const nsCString& uri);
+    virtual bool Recvmove(const PRUint32& x,
+                          const PRUint32& y,
+                          const PRUint32& width,
+                          const PRUint32& height);
 
 private:
     nsCOMPtr<nsIWebNavigation> mWebNav;
 
     DISALLOW_EVIL_CONSTRUCTORS(TabChild);
 };
 
 }
--- a/dom/plugins/BrowserStreamChild.cpp
+++ b/dom/plugins/BrowserStreamChild.cpp
@@ -66,55 +66,55 @@ BrowserStreamChild::BrowserStreamChild(P
 
   *rv = mInstance->mPluginIface->newstream(&mInstance->mData,
                                            const_cast<char*>(mimeType.get()),
                                            &mStream, seekable, stype);
   if (*rv != NPERR_NO_ERROR)
     mClosed = true;
 }
 
-nsresult
+bool
 BrowserStreamChild::AnswerNPP_WriteReady(const int32_t& newlength,
                                          int32_t *size)
 {
   if (mClosed) {
     *size = 0;
-    return NS_OK;
+    return true;
   }
 
   mStream.end = newlength;
 
   *size = mInstance->mPluginIface->writeready(&mInstance->mData, &mStream);
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 BrowserStreamChild::AnswerNPP_Write(const int32_t& offset,
                                     const Buffer& data,
                                     int32_t* consumed)
 {
   if (mClosed) {
     *consumed = -1;
-    return NS_OK;
+    return true;
   }
 
   *consumed = mInstance->mPluginIface->write(&mInstance->mData, &mStream,
                                              offset, data.Length(),
                                              const_cast<char*>(data.get()));
   if (*consumed < 0)
     mClosed = true;
 
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 BrowserStreamChild::AnswerNPP_StreamAsFile(const nsCString& fname)
 {
   if (mClosed)
-    return NS_OK;
+    return true;
 
   mInstance->mPluginIface->asfile(&mInstance->mData, &mStream,
                                   fname.get());
-  return NS_OK;
+  return true;
 }
 
 } /* namespace plugins */
 } /* namespace mozilla */
--- a/dom/plugins/BrowserStreamChild.h
+++ b/dom/plugins/BrowserStreamChild.h
@@ -54,23 +54,23 @@ public:
                      const uint32_t& lastmodified,
                      const nsCString& headers,
                      const nsCString& mimeType,
                      const bool& seekable,
                      NPError* rv,
                      uint16_t* stype);
   virtual ~BrowserStreamChild() { }
 
-  virtual nsresult AnswerNPP_WriteReady(const int32_t& newlength,
+  virtual bool AnswerNPP_WriteReady(const int32_t& newlength,
                                         int32_t *size);
-  virtual nsresult AnswerNPP_Write(const int32_t& offset,
+  virtual bool AnswerNPP_Write(const int32_t& offset,
                                    const Buffer& data,
                                    int32_t* consumed);
 
-  virtual nsresult AnswerNPP_StreamAsFile(const nsCString& fname);
+  virtual bool AnswerNPP_StreamAsFile(const nsCString& fname);
 
   void EnsureCorrectInstance(PluginInstanceChild* i)
   {
     if (i != mInstance)
       NS_RUNTIMEABORT("Incorrect stream instance");
   }
 
 private:
--- a/dom/plugins/BrowserStreamParent.cpp
+++ b/dom/plugins/BrowserStreamParent.cpp
@@ -9,37 +9,37 @@ namespace plugins {
 BrowserStreamParent::BrowserStreamParent(PluginInstanceParent* npp,
                                          NPStream* stream)
   : mNPP(npp)
   , mStream(stream)
 {
   mStream->pdata = this;
 }
 
-nsresult
+bool
 BrowserStreamParent::AnswerNPN_RequestRead(const IPCByteRanges& ranges,
                                            NPError* result)
 {
   if (!mStream)
-    return NS_ERROR_NOT_INITIALIZED;
+    return false;
 
   if (ranges.size() > PR_INT32_MAX) {
     // TODO: abort all processing!
     return NS_ERROR_INVALID_ARG;
   }
 
   nsAutoArrayPtr<NPByteRange> rp(new NPByteRange[ranges.size()]);
   for (PRUint32 i = 0; i < ranges.size(); ++i) {
     rp[i].offset = ranges[i].offset;
     rp[i].length = ranges[i].length;
     rp[i].next = &rp[i + 1];
   }
   rp[ranges.size()].next = NULL;
 
-  return mNPP->mNPNIface->requestread(mStream, rp);
+  return NPERR_NO_ERROR == mNPP->mNPNIface->requestread(mStream, rp);
 }
 
 int32_t
 BrowserStreamParent::WriteReady()
 {
   int32_t result;
   nsresult rv = CallNPP_WriteReady(mStream->end, &result);
   if (NS_FAILED(rv)) {
--- a/dom/plugins/BrowserStreamParent.h
+++ b/dom/plugins/BrowserStreamParent.h
@@ -15,17 +15,17 @@ class BrowserStreamParent : public PBrow
   friend class PluginModuleParent;
   friend class PluginInstanceParent;
 
 public:
   BrowserStreamParent(PluginInstanceParent* npp,
                       NPStream* stream);
   virtual ~BrowserStreamParent() { }
 
-  virtual nsresult AnswerNPN_RequestRead(const IPCByteRanges& ranges,
+  virtual bool AnswerNPN_RequestRead(const IPCByteRanges& ranges,
                                          NPError* result);
 
   int32_t WriteReady();
   int32_t Write(int32_t offset, int32_t len, void* buffer);
   void StreamAsFile(const char* fname);
   NPError NPN_DestroyStream(NPError reason);
 
 private:
--- a/dom/plugins/PluginInstanceChild.cpp
+++ b/dom/plugins/PluginInstanceChild.cpp
@@ -153,42 +153,42 @@ PluginInstanceChild::NPN_GetValue(NPNVar
 
     default:
         printf("  unhandled var %s\n", NPNVariableToString(aVar));
         return NPERR_GENERIC_ERROR;   
     }
 
 }
 
-nsresult
+bool
 PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginScriptableNPObject(
                                            PPluginScriptableObjectChild** value,
                                            NPError* result)
 {
 
     NPObject* object;
     *result = mPluginIface->getvalue(GetNPP(), NPPVpluginScriptableNPObject,
                                      &object);
     if (*result != NPERR_NO_ERROR) {
-        return NS_OK;
+        return true;
     }
 
     PluginScriptableObjectChild* actor = CreateActorForNPObject(object);
     if (!actor) {
         PluginModuleChild::sBrowserFuncs.releaseobject(object);
         *result = NPERR_GENERIC_ERROR;
-        return NS_OK;
+        return true;
     }
 
     PluginModuleChild::sBrowserFuncs.releaseobject(object);
     *value = actor;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceChild::AnswerNPP_SetWindow(const NPWindow& aWindow,
                                          NPError* rv)
 {
     printf("[PluginInstanceChild] NPP_SetWindow(%lx, %d, %d)\n",
            reinterpret_cast<unsigned long>(aWindow.window),
            aWindow.width, aWindow.height);
 
 #if defined(OS_LINUX)
@@ -243,17 +243,17 @@ PluginInstanceChild::AnswerNPP_SetWindow
                                  reinterpret_cast<LONG>(PluginWindowProc)));
         }
     }
 
 #else
 #  error Implement me for your OS
 #endif
 
-    return NS_OK;
+    return true;
 }
 
 bool
 PluginInstanceChild::Initialize()
 {
 #if defined(OS_WIN)
   if (!CreatePluginWindow())
       return false;
@@ -413,30 +413,30 @@ PluginInstanceChild::PPluginScriptableOb
     NS_ENSURE_TRUE(object, nsnull);
 
     *object = new PluginScriptableObjectChild();
     NS_ENSURE_TRUE(*object, nsnull);
 
     return object->get();
 }
 
-nsresult
+bool
 PluginInstanceChild::PPluginScriptableObjectDestructor(PPluginScriptableObjectChild* aObject)
 {
     PluginScriptableObjectChild* object =
         reinterpret_cast<PluginScriptableObjectChild*>(aObject);
 
     PRUint32 count = mScriptableObjects.Length();
     for (PRUint32 index = 0; index < count; index++) {
         if (mScriptableObjects[index] == object) {
             mScriptableObjects.RemoveElementAt(index);
             break;
         }
     }
-    return NS_OK;
+    return true;
 }
 
 PBrowserStreamChild*
 PluginInstanceChild::PBrowserStreamConstructor(const nsCString& url,
                                                const uint32_t& length,
                                                const uint32_t& lastmodified,
                                                const PStreamNotifyChild* notifyData,
                                                const nsCString& headers,
@@ -444,46 +444,46 @@ PluginInstanceChild::PBrowserStreamConst
                                                const bool& seekable,
                                                NPError* rv,
                                                uint16_t *stype)
 {
     return new BrowserStreamChild(this, url, length, lastmodified, headers,
                                   mimeType, seekable, rv, stype);
 }
 
-nsresult
+bool
 PluginInstanceChild::PBrowserStreamDestructor(PBrowserStreamChild* stream,
                                               const NPError& reason,
                                               const bool& artificial)
 {
     delete stream;
-    return NS_OK;
+    return true;
 }
 
 PStreamNotifyChild*
 PluginInstanceChild::PStreamNotifyConstructor(const nsCString& url,
                                               const nsCString& target,
                                               const bool& post,
                                               const nsCString& buffer,
                                               const bool& file,
                                               NPError* result)
 {
     NS_RUNTIMEABORT("not reached");
     return NULL;
 }
 
-nsresult
+bool
 PluginInstanceChild::PStreamNotifyDestructor(PStreamNotifyChild* notifyData,
                                              const NPReason& reason)
 {
     StreamNotifyChild* sn = static_cast<StreamNotifyChild*>(notifyData);
     mPluginIface->urlnotify(&mData, sn->mURL.get(), reason, sn->mClosure);
     delete sn;
 
-    return NS_OK;
+    return true;
 }
 
 PluginScriptableObjectChild*
 PluginInstanceChild::CreateActorForNPObject(NPObject* aObject)
 {
   NS_ASSERTION(aObject, "Null pointer!");
 
   PluginScriptableObjectChild* actor =
--- a/dom/plugins/PluginInstanceChild.h
+++ b/dom/plugins/PluginInstanceChild.h
@@ -62,51 +62,51 @@ class PluginInstanceChild : public PPlug
                                              UINT message,
                                              WPARAM wParam,
                                              LPARAM lParam);
 #endif
 
 protected:
     friend class BrowserStreamChild;
 
-    virtual nsresult AnswerNPP_SetWindow(const NPWindow& window, NPError* rv);
+    virtual bool AnswerNPP_SetWindow(const NPWindow& window, NPError* rv);
 
-    virtual nsresult
+    virtual bool
     AnswerNPP_GetValue_NPPVpluginScriptableNPObject(PPluginScriptableObjectChild** value,
                                                     NPError* result);
 
     virtual PPluginScriptableObjectChild*
     PPluginScriptableObjectConstructor();
 
-    virtual nsresult
+    virtual bool
     PPluginScriptableObjectDestructor(PPluginScriptableObjectChild* aObject);
 
     virtual PBrowserStreamChild*
     PBrowserStreamConstructor(const nsCString& url,
                               const uint32_t& length,
                               const uint32_t& lastmodified,
                               const PStreamNotifyChild* notifyData,
                               const nsCString& headers,
                               const nsCString& mimeType,
                               const bool& seekable,
                               NPError* rv,
                               uint16_t *stype);
 
-    virtual nsresult
+    virtual bool
     PBrowserStreamDestructor(PBrowserStreamChild* stream,
                              const NPError& reason,
                              const bool& artificial);
 
     virtual PStreamNotifyChild*
     PStreamNotifyConstructor(const nsCString& url, const nsCString& target,
                              const bool& post, const nsCString& buffer,
                              const bool& file,
                              NPError* result);
 
-    virtual nsresult
+    virtual bool
     PStreamNotifyDestructor(PStreamNotifyChild* notifyData,
                             const NPReason& reason);
 
 public:
     PluginInstanceChild(const NPPluginFuncs* aPluginIface) :
         mPluginIface(aPluginIface)
 #if defined(OS_LINUX)
         , mPlug(0)
--- a/dom/plugins/PluginInstanceParent.cpp
+++ b/dom/plugins/PluginInstanceParent.cpp
@@ -53,108 +53,108 @@ PluginInstanceParent::PBrowserStreamCons
                                                 const bool& seekable,
                                                 NPError* rv,
                                                 uint16_t *stype)
 {
     NS_RUNTIMEABORT("Not reachable");
     return NULL;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerPBrowserStreamDestructor(PBrowserStreamParent* stream,
                                                      const NPError& reason,
                                                      const bool& artificial)
 {
     if (!artificial) {
         static_cast<BrowserStreamParent*>(stream)->NPN_DestroyStream(reason);
     }
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::PBrowserStreamDestructor(PBrowserStreamParent* stream,
                                                const NPError& reason,
                                                const bool& artificial)
 {
     delete stream;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetValue_NPNVjavascriptEnabledBool(
                                                        bool* value,
                                                        NPError* result)
 {
     NPBool v;
     *result = mNPNIface->getvalue(mNPP, NPNVjavascriptEnabledBool, &v);
     *value = v;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetValue_NPNVisOfflineBool(bool* value,
                                                            NPError* result)
 {
     NPBool v;
     *result = mNPNIface->getvalue(mNPP, NPNVisOfflineBool, &v);
     *value = v;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetValue_NPNVWindowNPObject(
                                         PPluginScriptableObjectParent** value,
                                         NPError* result)
 {
     // TODO NPRuntime
     *value = NULL;
     *result = NPERR_GENERIC_ERROR;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetValue_NPNVPluginElementNPObject(
                                         PPluginScriptableObjectParent** value,
                                         NPError* result)
 {
     // TODO NPRuntime
     *value = NULL;
     *result = NPERR_GENERIC_ERROR;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetValue_NPNVprivateModeBool(bool* value,
                                                              NPError* result)
 {
     NPBool v;
     *result = mNPNIface->getvalue(mNPP, NPNVprivateModeBool, &v);
     *value = v;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_GetURL(const nsCString& url,
                                        const nsCString& target,
                                        NPError* result)
 {
     *result = mNPNIface->geturl(mNPP, url.get(), target.get());
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginInstanceParent::AnswerNPN_PostURL(const nsCString& url,
                                         const nsCString& target,
                                         const nsCString& buffer,
                                         const bool& file,
                                         NPError* result)
 {
     *result = mNPNIface->posturl(mNPP, url.get(), target.get(),
                                  buffer.Length(), buffer.get(), file);
-    return NS_OK;
+    return true;
 }
 
 PStreamNotifyParent*
 PluginInstanceParent::PStreamNotifyConstructor(const nsCString& url,
                                                const nsCString& target,
                                                const bool& post,
                                                const nsCString& buffer,
                                                const bool& file,
@@ -170,22 +170,22 @@ PluginInstanceParent::PStreamNotifyConst
         *result = mNPNIface->posturlnotify(mNPP, url.get(), target.get(),
                                            buffer.Length(), buffer.get(),
                                            file, notifyData);
     }
     // TODO: what if this method fails?
     return notifyData;
 }
 
-nsresult
+bool
 PluginInstanceParent::PStreamNotifyDestructor(PStreamNotifyParent* notifyData,
                                               const NPReason& reason)
 {
     delete notifyData;
-    return NS_OK;
+    return true;
 }
 
 NPError
 PluginInstanceParent::NPP_SetWindow(NPWindow* aWindow)
 {
     _MOZ_LOG(__FUNCTION__);
     NS_ENSURE_TRUE(aWindow, NPERR_GENERIC_ERROR);
 
@@ -253,17 +253,17 @@ PluginInstanceParent::NPP_DestroyStream(
 }
 
 PPluginScriptableObjectParent*
 PluginInstanceParent::PPluginScriptableObjectConstructor()
 {
     return new PluginScriptableObjectParent();
 }
 
-nsresult
+bool
 PluginInstanceParent::PPluginScriptableObjectDestructor(PPluginScriptableObjectParent* aObject)
 {
     delete aObject;
-    return NS_OK;
+    return true;
 }
 
 } // namespace plugins
 } // namespace mozilla
--- a/dom/plugins/PluginInstanceParent.h
+++ b/dom/plugins/PluginInstanceParent.h
@@ -67,71 +67,71 @@ public:
 
     virtual ~PluginInstanceParent()
     {
     }
   
     virtual PPluginScriptableObjectParent*
     PPluginScriptableObjectConstructor();
 
-    virtual nsresult
+    virtual bool
     PPluginScriptableObjectDestructor(PPluginScriptableObjectParent* aObject);
 
     virtual PBrowserStreamParent*
     PBrowserStreamConstructor(const nsCString& url,
                               const uint32_t& length,
                               const uint32_t& lastmodified,
                               const PStreamNotifyParent* notifyData,
                               const nsCString& headers,
                               const nsCString& mimeType,
                               const bool& seekable,
                               NPError* rv,
                               uint16_t *stype);
 
-    virtual nsresult
+    virtual bool
     AnswerPBrowserStreamDestructor(PBrowserStreamParent* stream,
                                    const NPError& reason,
                                    const bool& artificial);
 
-    virtual nsresult
+    virtual bool
     PBrowserStreamDestructor(PBrowserStreamParent* stream,
                              const NPError& reason,
                              const bool& artificial);
 
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetValue_NPNVjavascriptEnabledBool(bool* value, NPError* result);
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetValue_NPNVisOfflineBool(bool* value, NPError* result);
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetValue_NPNVWindowNPObject(
                                        PPluginScriptableObjectParent** value,
                                        NPError* result);
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetValue_NPNVPluginElementNPObject(
                                        PPluginScriptableObjectParent** value,
                                        NPError* result);
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetValue_NPNVprivateModeBool(bool* value, NPError* result);
 
-    virtual nsresult
+    virtual bool
     AnswerNPN_GetURL(const nsCString& url, const nsCString& target,
                      NPError *result);
 
-    virtual nsresult
+    virtual bool
     AnswerNPN_PostURL(const nsCString& url, const nsCString& target,
                       const nsCString& buffer, const bool& file,
                       NPError* result);
 
     virtual PStreamNotifyParent*
     PStreamNotifyConstructor(const nsCString& url, const nsCString& target,
                              const bool& post, const nsCString& buffer,
                              const bool& file,
                              NPError* result);
 
-    virtual nsresult
+    virtual bool
     PStreamNotifyDestructor(PStreamNotifyParent* notifyData,
                             const NPReason& reason);
 
     NPError NPP_SetWindow(NPWindow* aWindow);
     NPError NPP_GetValue(NPPVariable variable, void *ret_value);
 
     NPError NPP_SetValue(NPNVariable variable, void *value)
     {
--- a/dom/plugins/PluginModuleChild.cpp
+++ b/dom/plugins/PluginModuleChild.cpp
@@ -928,34 +928,36 @@ void NP_CALLBACK
                        PluginThreadCallback aFunc,
                        void* aUserData)
 {
     _MOZ_LOG(__FUNCTION__);
 }
 
 #endif /* NP_VERSION_MINOR > 19 */
 
-nsresult
+bool
 PluginModuleChild::AnswerNP_Initialize(NPError* _retval)
 {
     _MOZ_LOG(__FUNCTION__);
 
 #if defined(OS_LINUX)
     *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
-    return NS_OK;
+    return true;
 
 #elif defined(OS_WIN)
     nsresult rv = mGetEntryPointsFunc(&mFunctions);
-    NS_ENSURE_SUCCESS(rv, rv);
+    if (NS_FAILED(rv)) {
+        return false;
+    }
 
     NS_ASSERTION(HIBYTE(mFunctions.version) >= NP_VERSION_MAJOR,
                  "callback version is less than NP version");
 
     *_retval = mInitializeFunc(&sBrowserFuncs);
-    return NS_OK;
+    return true;
 #else
 #  error Please implement me for your platform
 #endif
 }
 
 PPluginInstanceChild*
 PluginModuleChild::PPluginInstanceConstructor(const nsCString& aMimeType,
                                               const uint16_t& aMode,
@@ -969,17 +971,17 @@ PluginModuleChild::PPluginInstanceConstr
         new PluginInstanceChild(&mFunctions));
     if (!childInstance->Initialize()) {
         *rv = NPERR_GENERIC_ERROR;
         return 0;
     }
     return childInstance.forget();
 }
 
-nsresult
+bool
 PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor,
                                                     const nsCString& aMimeType,
                                                     const uint16_t& aMode,
                                                     const nsTArray<nsCString>& aNames,
                                                     const nsTArray<nsCString>& aValues,
                                                     NPError* rv)
 {
     _MOZ_LOG(__FUNCTION__);
@@ -1016,24 +1018,24 @@ PluginModuleChild::AnswerPPluginInstance
                           argn,
                           argv,
                           0);
     if (NPERR_NO_ERROR != *rv) {
         return NS_ERROR_FAILURE;
     }
 
     printf ("[PluginModuleChild] %s: returning %hd\n", __FUNCTION__, *rv);
-    return NS_OK;;
+    return true;;
 }
 
-nsresult
+bool
 PluginModuleChild::PPluginInstanceDestructor(PPluginInstanceChild* actor,
                                              NPError* rv)
 {
     _MOZ_LOG(__FUNCTION__);
 
     PluginInstanceChild* inst = static_cast<PluginInstanceChild*>(actor);
     *rv = mFunctions.destroy(inst->GetNPP(), 0);
     delete actor;
     inst->GetNPP()->ndata = 0;
 
-    return NS_OK;
+    return true;
 }
--- a/dom/plugins/PluginModuleChild.h
+++ b/dom/plugins/PluginModuleChild.h
@@ -95,30 +95,30 @@ namespace mozilla {
 namespace plugins {
 
 class PluginScriptableObjectChild;
 
 class PluginModuleChild : public PPluginModuleChild
 {
 protected:
     // Implement the PPluginModuleChild interface
-    virtual nsresult AnswerNP_Initialize(NPError* rv);
+    virtual bool AnswerNP_Initialize(NPError* rv);
 
     virtual PPluginInstanceChild*
     PPluginInstanceConstructor(const nsCString& aMimeType,
                                const uint16_t& aMode,
                                const nsTArray<nsCString>& aNames,
                                const nsTArray<nsCString>& aValues,
                                NPError* rv);
 
-    virtual nsresult
+    virtual bool
     PPluginInstanceDestructor(PPluginInstanceChild* aActor,
                               NPError* rv);
 
-    virtual nsresult
+    virtual bool
     AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor,
                                      const nsCString& aMimeType,
                                      const uint16_t& aMode,
                                      const nsTArray<nsCString>& aNames,
                                      const nsTArray<nsCString>& aValues,
                                      NPError* rv);
 
 public:
--- a/dom/plugins/PluginModuleParent.cpp
+++ b/dom/plugins/PluginModuleParent.cpp
@@ -91,23 +91,23 @@ PluginModuleParent::PPluginInstanceConst
                                                const nsTArray<nsCString>& aNames,
                                                const nsTArray<nsCString>& aValues,
                                                NPError* rv)
 {
     NS_ERROR("Not reachable!");
     return NULL;
 }
 
-nsresult
+bool
 PluginModuleParent::PPluginInstanceDestructor(PPluginInstanceParent* aActor,
                                               NPError* _retval)
 {
     _MOZ_LOG(__FUNCTION__);
     delete aActor;
-    return NS_OK;
+    return true;
 }
 
 void
 PluginModuleParent::SetPluginFuncs(NPPluginFuncs* aFuncs)
 {
     aFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
     aFuncs->javaClass = nsnull;
 
@@ -318,83 +318,83 @@ PluginModuleParent::NPP_GetValue(NPP ins
 
 NPError
 PluginModuleParent::NPP_SetValue(NPP instance, NPNVariable variable,
                                  void *value)
 {
     return InstCast(instance)->NPP_SetValue(variable, value);
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_GetStringIdentifier(const nsCString& aString,
                                                 NPRemoteIdentifier* aId)
 {
     NS_ENSURE_ARG(!aString.IsVoid());
 
     NPIdentifier ident = _getstringidentifier(aString.BeginReading());
     NS_ENSURE_STATE(ident);
 
     nsVoidPtrHashKey* newEntry = mValidIdentifiers.PutEntry(ident);
     NS_ENSURE_TRUE(newEntry, NS_ERROR_OUT_OF_MEMORY);
 
     *aId = (NPRemoteIdentifier)ident;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_GetIntIdentifier(const int32_t& aInt,
                                              NPRemoteIdentifier* aId)
 {
     NPIdentifier ident = _getintidentifier(aInt);
     NS_ENSURE_STATE(ident);
 
     nsVoidPtrHashKey* newEntry = mValidIdentifiers.PutEntry(ident);
     NS_ENSURE_TRUE(newEntry, NS_ERROR_OUT_OF_MEMORY);
 
     *aId = (NPRemoteIdentifier)ident;
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_UTF8FromIdentifier(const NPRemoteIdentifier& aId,
                                                nsCString* aString)
 {
     NPIdentifier ident = GetValidNPIdentifier(aId);
     NS_ENSURE_ARG(ident);
 
     NPUTF8* val = _utf8fromidentifier(ident);
     NS_ENSURE_STATE(val);
 
     aString->Assign(val);
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_IntFromIdentifier(const NPRemoteIdentifier& aId,
                                               int32_t* aInt)
 {
     NPIdentifier ident = GetValidNPIdentifier(aId);
     NS_ENSURE_ARG(ident);
 
     *aInt = _intfromidentifier(ident);
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_IdentifierIsString(const NPRemoteIdentifier& aId,
                                                bool* aIsString)
 {
     NPIdentifier ident = GetValidNPIdentifier(aId);
     NS_ENSURE_ARG(ident);
 
     *aIsString = _identifierisstring(ident);
-    return NS_OK;
+    return true;
 }
 
-nsresult
+bool
 PluginModuleParent::RecvNPN_GetStringIdentifiers(const nsTArray<nsCString>& aNames,
                                                  nsTArray<NPRemoteIdentifier>* aIds)
 {
     NS_ASSERTION(aIds->IsEmpty(), "Non-empty array!");
 
     PRUint32 count = aNames.Length();
     NS_ENSURE_ARG_MIN(count, 1);
 
@@ -423,17 +423,17 @@ PluginModuleParent::RecvNPN_GetStringIde
         if (id) {
             nsVoidPtrHashKey* newEntry = mValidIdentifiers.PutEntry(id);
             NS_ENSURE_TRUE(ok, NS_ERROR_OUT_OF_MEMORY);
         }
 
         aIds->AppendElement((NPRemoteIdentifier)id);
     }
 
-    return NS_OK;
+    return true;
 }
 
 PluginInstanceParent*
 PluginModuleParent::InstCast(NPP instance)
 {
     PluginInstanceParent* ip =
         static_cast<PluginInstanceParent*>(instance->pdata);
     if (instance != ip->mNPP) {
--- a/dom/plugins/PluginModuleParent.h
+++ b/dom/plugins/PluginModuleParent.h
@@ -86,17 +86,17 @@ private:
 protected:
     PPluginInstanceParent*
     PPluginInstanceConstructor(const nsCString& aMimeType,
                                const uint16_t& aMode,
                                const nsTArray<nsCString>& aNames,
                                const nsTArray<nsCString>& aValues,
                                NPError* rv);
 
-    virtual nsresult
+    virtual bool
     PPluginInstanceDestructor(PPluginInstanceParent* aActor,
                               NPError* _retval);
 
 public:
     PluginModuleParent(const char* aFilePath);
 
     virtual ~PluginModuleParent();
 
@@ -106,32 +106,32 @@ public:
      * Returns a SharedLibrary from which plugin symbols should be
      * resolved.  This may or may not launch a plugin child process,
      * and may or may not be very expensive.
      */
     static SharedLibrary* LoadModule(const char* aFilePath,
                                      PRLibrary* aLibrary);
 
     // NPRemoteIdentifier funcs
-    virtual nsresult
+    virtual bool
     RecvNPN_GetStringIdentifier(const nsCString& aString,
                                 NPRemoteIdentifier* aId);
-    virtual nsresult
+    virtual bool
     RecvNPN_GetIntIdentifier(const int32_t& aInt,
                              NPRemoteIdentifier* aId);
-    virtual nsresult
+    virtual bool
     RecvNPN_UTF8FromIdentifier(const NPRemoteIdentifier& aId,
                                nsCString* aString);
-    virtual nsresult
+    virtual bool
     RecvNPN_IntFromIdentifier(const NPRemoteIdentifier& aId,
                               int32_t* aInt);
-    virtual nsresult
+    virtual bool
     RecvNPN_IdentifierIsString(const NPRemoteIdentifier& aId,
                                bool* aIsString);
-    virtual nsresult
+    virtual bool
     RecvNPN_GetStringIdentifiers(const nsTArray<nsCString>& aNames,
                                  nsTArray<NPRemoteIdentifier>* aIds);
 
 private:
     void SetPluginFuncs(NPPluginFuncs* aFuncs);
 
     // Implement the module-level functions from NPAPI; these are
     // normally resolved directly from the DSO.
--- a/dom/plugins/PluginScriptableObjectChild.cpp
+++ b/dom/plugins/PluginScriptableObjectChild.cpp
@@ -120,16 +120,19 @@ ConvertToVariant(const NPRemoteVariant& 
     case NPRemoteVariant::TPPluginScriptableObjectChild: {
       NPObject* object = NPObjectFromVariant(aRemoteVariant);
       if (!object) {
         return false;
       }
       OBJECT_TO_NPVARIANT(object, aVariant);
       return true;
     }
+
+  default:
+      break;                    // break to NOTREACHED
   }
 
   NS_NOTREACHED("Shouldn't get here!");
   return false;
 }
 
 bool
 ConvertToRemoteVariant(const NPVariant& aVariant,
@@ -203,299 +206,299 @@ PluginScriptableObjectChild::Initialize(
                                         NPObject* aObject)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(!(mInstance && mObject), "Calling Initialize class twice!");
   mInstance = aInstance;
   mObject = PluginModuleChild::sBrowserFuncs.retainobject(aObject);
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerInvalidate()
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   if (mObject) {
     PluginModuleChild::sBrowserFuncs.releaseobject(mObject);
     mObject = nsnull;
-    return NS_OK;
+    return true;
   }
   return NS_ERROR_UNEXPECTED;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerHasMethod(const NPRemoteIdentifier& aId,
                                              bool* aHasMethod)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->hasMethod)) {
     *aHasMethod = false;
-    return NS_OK;
+    return true;
   }
 
   *aHasMethod = mObject->_class->hasMethod(mObject, (NPIdentifier)aId);
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerInvoke(const NPRemoteIdentifier& aId,
                                           const nsTArray<NPRemoteVariant>& aArgs,
                                           NPRemoteVariant* aResult,
                                           bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->invoke)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   nsAutoTArray<NPVariant, 10> convertedArgs;
   PRUint32 argCount = aArgs.Length();
 
   if (!convertedArgs.SetLength(argCount)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   for (PRUint32 index = 0; index < argCount; index++) {
     if (!ConvertToVariant(aArgs[index], convertedArgs[index])) {
       *aSuccess = false;
-      return NS_OK;
+      return true;
     }
   }
 
   NPVariant result;
   bool success = mObject->_class->invoke(mObject, (NPIdentifier)aId,
                                          convertedArgs.Elements(), argCount,
                                          &result);
   if (!success) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPRemoteVariant convertedResult;
   if (!ConvertToRemoteVariant(result, convertedResult, mInstance)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   *aSuccess = true;
   *aResult = convertedResult;
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerInvokeDefault(const nsTArray<NPRemoteVariant>& aArgs,
                                                  NPRemoteVariant* aResult,
                                                  bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->invokeDefault)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   nsAutoTArray<NPVariant, 10> convertedArgs;
   PRUint32 argCount = aArgs.Length();
 
   if (!convertedArgs.SetLength(argCount)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   for (PRUint32 index = 0; index < argCount; index++) {
     if (!ConvertToVariant(aArgs[index], convertedArgs[index])) {
       *aSuccess = false;
-      return NS_OK;
+      return true;
     }
   }
 
   NPVariant result;
   bool success = mObject->_class->invokeDefault(mObject,
                                                 convertedArgs.Elements(),
                                                 argCount, &result);
   if (!success) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPRemoteVariant convertedResult;
   if (!ConvertToRemoteVariant(result, convertedResult, mInstance)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   *aSuccess = true;
   *aResult = convertedResult;
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerHasProperty(const NPRemoteIdentifier& aId,
                                                bool* aHasProperty)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->hasProperty)) {
     *aHasProperty = false;
-    return NS_OK;
+    return true;
   }
 
   *aHasProperty = mObject->_class->hasProperty(mObject, (NPIdentifier)aId);
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerGetProperty(const NPRemoteIdentifier& aId,
                                                NPRemoteVariant* aResult,
                                                bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->getProperty)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPVariant result;
   if (!mObject->_class->getProperty(mObject, (NPIdentifier)aId, &result)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPRemoteVariant converted;
   if ((*aSuccess = ConvertToRemoteVariant(result, converted, mInstance))) {
     *aResult = converted;
   }
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerSetProperty(const NPRemoteIdentifier& aId,
                                                const NPRemoteVariant& aValue,
                                                bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->setProperty)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPVariant converted;
   if (!ConvertToVariant(aValue, converted)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   *aSuccess = mObject->_class->setProperty(mObject, (NPIdentifier)aId,
                                            &converted);
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerRemoveProperty(const NPRemoteIdentifier& aId,
                                                   bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->removeProperty)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   *aSuccess = mObject->_class->removeProperty(mObject, (NPIdentifier)aId);
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerEnumerate(nsTArray<NPRemoteIdentifier>* aProperties,
                                              bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->enumerate)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPIdentifier* ids;
   uint32_t idCount;
   if (!mObject->_class->enumerate(mObject, &ids, &idCount)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   if (!aProperties->SetCapacity(idCount)) {
     PluginModuleChild::sBrowserFuncs.memfree(ids);
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   for (uint32_t index = 0; index < idCount; index++) {
 #ifdef DEBUG
     NPRemoteIdentifier* remoteId =
 #endif
     aProperties->AppendElement((NPRemoteIdentifier)ids[index]);
     NS_ASSERTION(remoteId, "Shouldn't fail if SetCapacity above succeeded!");
   }
 
   PluginModuleChild::sBrowserFuncs.memfree(ids);
   *aSuccess = true;
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 PluginScriptableObjectChild::AnswerConstruct(const nsTArray<NPRemoteVariant>& aArgs,
                                              NPRemoteVariant* aResult,
                                              bool* aSuccess)
 {
   NS_ENSURE_STATE(NS_IsMainThread());
   NS_ENSURE_STATE(mObject);
 
   if (!(mObject->_class && mObject->_class->construct)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   nsAutoTArray<NPVariant, 10> convertedArgs;
   PRUint32 argCount = aArgs.Length();
 
   if (!convertedArgs.SetLength(argCount)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   for (PRUint32 index = 0; index < argCount; index++) {
     if (!ConvertToVariant(aArgs[index], convertedArgs[index])) {
       *aSuccess = false;
-      return NS_OK;
+      return true;
     }
   }
 
   NPVariant result;
   bool success = mObject->_class->construct(mObject, convertedArgs.Elements(),
                                             argCount, &result);
   if (!success) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   NPRemoteVariant convertedResult;
   if (!ConvertToRemoteVariant(result, convertedResult, mInstance)) {
     *aSuccess = false;
-    return NS_OK;
+    return true;
   }
 
   *aSuccess = true;
   *aResult = convertedResult;
-  return NS_OK;
+  return true;
 }
--- a/dom/plugins/PluginScriptableObjectChild.h
+++ b/dom/plugins/PluginScriptableObjectChild.h
@@ -49,57 +49,57 @@ namespace plugins {
 class PluginInstanceChild;
 
 class PluginScriptableObjectChild : public PPluginScriptableObjectChild
 {
 public:
   PluginScriptableObjectChild();
   virtual ~PluginScriptableObjectChild();
 
-  virtual nsresult
+  virtual bool
   AnswerInvalidate();
 
-  virtual nsresult
+  virtual bool
   AnswerHasMethod(const NPRemoteIdentifier& aId,
                   bool* aHasMethod);
 
-  virtual nsresult
+  virtual bool
   AnswerInvoke(const NPRemoteIdentifier& aId,
                const nsTArray<NPRemoteVariant>& aArgs,
                NPRemoteVariant* aResult,
                bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerInvokeDefault(const nsTArray<NPRemoteVariant>& aArgs,
                       NPRemoteVariant* aResult,
                       bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerHasProperty(const NPRemoteIdentifier& aId,
                     bool* aHasProperty);
 
-  virtual nsresult
+  virtual bool
   AnswerGetProperty(const NPRemoteIdentifier& aId,
                     NPRemoteVariant* aResult,
                     bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerSetProperty(const NPRemoteIdentifier& aId,
                     const NPRemoteVariant& aValue,
                     bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerRemoveProperty(const NPRemoteIdentifier& aId,
                        bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerEnumerate(nsTArray<NPRemoteIdentifier>* aProperties,
                   bool* aSuccess);
 
-  virtual nsresult
+  virtual bool
   AnswerConstruct(const nsTArray<NPRemoteVariant>& aArgs,
                   NPRemoteVariant* aResult,
                   bool* aSuccess);
 
   void
   Initialize(PluginInstanceChild* aInstance,
              NPObject* aObject);
 
--- a/ipc/app/MozillaRuntimeMain.cpp
+++ b/ipc/app/MozillaRuntimeMain.cpp
@@ -49,17 +49,17 @@
 #include <windows.h>
 // we want a wmain entry point
 #include "nsWindowsWMain.cpp"
 #endif
 
 int
 main(int argc, char* argv[])
 {
-#if 1
+#if defined(XP_WIN) && defined(DEBUG_bent)
     MessageBox(NULL, L"Hi", L"Hi", MB_OK);
 #endif
 
     GeckoProcessType proctype =
         XRE_StringToChildProcessType(argv[argc - 1]);
 
     nsresult rv = XRE_InitChildProcess(argc - 1, argv, proctype);
     NS_ENSURE_SUCCESS(rv, 1);
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -387,18 +387,24 @@ class GenerateProtocolHeader(Visitor):
             opeq.addstmt(cxx.StmtExpr(
                 cxx.ExprAssn(cxx.ExprDeref(callptrmeth),
                              rhsvar)))
             opeq.addstmt(returnthis)
             opeqs.append(opeq)
 
             opeqswitch.addstmt(caselabel)
             opeqswitch.addstmt(cxx.StmtExpr(
-                cxx.ExprAssn(cxx.ExprDeref(callptrmeth),
-                             cxx.ExprCast(rhsvar, clstyperef, const=1))))
+                cxx.ExprAssn(
+                    cxx.ExprDeref(callptrmeth),
+                    cxx.ExprCall(
+                        cxx.ExprSelect(
+                            cxx.ExprCast(rhsvar, clstyperef, const=1),
+                            '.',
+                            gettypen)))))
+                
             opeqswitch.addstmt(cxx.StmtBreak())
 
             optype = cxx.MethodDefn(
                 cxx.MethodDecl('operator '+ typename +'&', typeop=1))
             optype.addstmt(returngettype)
             optypes.append(optype)
 
             opconsttype = cxx.MethodDefn(
@@ -803,17 +809,17 @@ class GenerateProtocolHeader(Visitor):
 
         md._cxx.params = [ makeCxxDecl(d) for d in md.inParams ]
         md._cxx.returns = [ makeCxxDecl(d) for d in md.outParams ]
 
         # generate C++ interface to message sending/handling
         method = cxx.MethodDecl(
             name=md.decl.progname,
             params=[ ],
-            ret=cxx.Type('nsresult'),
+            ret=cxx.Type('bool'),
             virtual=1)
         for param in md._cxx.params:
             pcopy = deepcopy(param)
             pcopy.type.const = 1
             if not param.type.actor:
                 pcopy.type.ref = 1
             method.params.append(pcopy)
         for ret in md._cxx.returns:
@@ -1979,18 +1985,17 @@ class GenerateProtocolActorHeader(Visito
                             cxx.ExprSelect(objvar, '->', 'mManager'),
                             cxx.ExprLiteral.ZERO)))
 
                 calldtor = cxx.ExprCall(
                     cxx.ExprVar(md._cxx.method.name),
                     ([ objvar ]
                      + [ cxx.ExprVar(p.name) for p in md._cxx.params ]
                      + [ cxx.ExprVar(r.name) for r in md._cxx.returns ]))
-                failif = cxx.StmtIf(cxx.ExprCall(
-                        cxx.ExprVar('NS_FAILED'), [ calldtor ]))
+                failif = cxx.StmtIf(cxx.ExprPrefixUnop(calldtor, '!'))
                 failif.addifstmt(cxx.StmtReturn(valueerrcode))
                 impl.addstmt(failif)
 
             impl.addstmt(cxx.StmtReturn(okcode))
             self.cls.addstmt(impl)
             self.cls.addstmt(cxx.Whitespace.NL)
 
 
@@ -2176,33 +2181,31 @@ class GenerateProtocolActorHeader(Visito
             # call the C++ handler hook
             callimpl = cxx.ExprCall(
                 cxx.ExprVar(pfx + md.decl.progname), [ ])
             if md.decl.type.isCtor() or md.decl.type.isDtor():
                 callimpl.args += [ objvar ]
             callimpl.args += [ cxx.ExprVar(p.name) for p in md._cxx.params ]
             callimpl.args += [ cxx.ExprAddrOf(cxx.ExprVar(r.name))
                                for r in md._cxx.returns ]
-            errhandle = cxx.StmtIf(cxx.ExprCall(
-                cxx.ExprVar('NS_FAILED'), [ callimpl ]))
+            errhandle = cxx.StmtIf(cxx.ExprPrefixUnop(callimpl, '!'))
             errhandle.ifb.addstmt(cxx.StmtReturn(
                 cxx.ExprVar('MsgValueError')))
             block.addstmt(errhandle)
 
             block.addstmt(cxx.Whitespace.NL)
 
             if md.decl.type.isDtor():
                 calldtor = cxx.ExprCall(
                     cxx.ExprVar(md._cxx.method.name),
                     ([ objvar ]
                      + [ cxx.ExprVar(p.name) for p in md._cxx.params ]
                      + [ cxx.ExprAddrOf(cxx.ExprVar(r.name)) for
                          r in md._cxx.returns ]))
-                failif = cxx.StmtIf(cxx.ExprCall(
-                        cxx.ExprVar('NS_FAILED'), [ calldtor ]))
+                failif = cxx.StmtIf(cxx.ExprPrefixUnop(calldtor, '!'))
                 failif.ifb.addstmt(cxx.StmtReturn(cxx.ExprVar('MsgValueError')))
                 block.addstmt(failif)
                 block.addstmt(cxx.StmtExpr(
                         cxx.ExprCall(cxx.ExprVar('Unregister'), [ routevar ])))
                 block.addstmt(cxx.StmtExpr(
                         cxx.ExprAssn(routevar, cxx.ExprLiteral.ZERO)))
 
             if md.decl.type.hasReply():
--- a/ipc/test-harness/TestChild.cpp
+++ b/ipc/test-harness/TestChild.cpp
@@ -46,43 +46,43 @@ TestChild::TestChild()
 
 TestChild::~TestChild()
 {
 }
 
 #if 1
 //-----------------------------------------------------------------------------
 // "Hello world" example
-nsresult TestChild::RecvHello()
+bool TestChild::RecvHello()
 {
-    puts("[TestChild] Hello, ");
-    SendWorld();
-    return NS_OK;
+  puts("[TestChild] Hello, ");
+  SendWorld();
+  return true;
 }
 
 
 #elif 0
 //-----------------------------------------------------------------------------
 // Example solution to exercise
-nsresult TestChild::RecvPing()
+bool TestChild::RecvPing()
 {
-    return SendPong(42);
+  return SendPong(42);
 }
 
-nsresult TestChild::RecvPong(const int& status)
+bool TestChild::RecvPong(const int& status)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
-nsresult TestChild::RecvTellValue(
+bool TestChild::RecvTellValue(
             const String& key,
             const String& val)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
-nsresult TestChild::RecvTellValues(
+bool TestChild::RecvTellValues(
             const StringArray& keys,
             const StringArray& vals)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 #endif
--- a/ipc/test-harness/TestChild.h
+++ b/ipc/test-harness/TestChild.h
@@ -46,28 +46,28 @@ namespace test {
 // Header file contents
 class TestChild : public PTestChild
 {
 protected:
 
 #if 1
 //-----------------------------------------------------------------------------
 // "Hello world" example
-    virtual nsresult RecvHello();
+    virtual bool RecvHello();
 
 
 #elif 0
 //-----------------------------------------------------------------------------
 // Example solution to exercise
-    virtual nsresult RecvPing();
-    virtual nsresult RecvPong(const int& status);
-    virtual nsresult RecvTellValue(
+    virtual bool RecvPing();
+    virtual bool RecvPong(const int& status);
+    virtual bool RecvTellValue(
                 const String& key,
                 const String& val);
-    virtual nsresult RecvTellValues(
+    virtual bool RecvTellValues(
                 const StringArray& keys,
                 const StringArray& vals);
 #endif
 
 public:
     TestChild();
     virtual ~TestChild();
 };
--- a/ipc/test-harness/TestParent.cpp
+++ b/ipc/test-harness/TestParent.cpp
@@ -48,60 +48,60 @@ TestParent::~TestParent()
 {
 }
 
 
 void
 TestParent::DoStuff()
 {
 #if 1
-    puts("[TestParent] in DoStuff()");
-    SendHello();
+  puts("[TestParent] in DoStuff()");
+  SendHello();
 #elif 0
-    puts("[TestParent] pinging child ...");
-    SendPing();
+  puts("[TestParent] pinging child ...");
+  SendPing();
 #endif
 }
 
 
 #if 1
 //-----------------------------------------------------------------------------
 // "Hello world" exampl
-nsresult TestParent::RecvWorld()
+bool TestParent::RecvWorld()
 {
-    puts("[TestParent] world!");
-    return NS_OK;
+  puts("[TestParent] world!");
+  return true;
 }
 
 
 #elif 0
 //-----------------------------------------------------------------------------
 // Example solution to exercise
-nsresult TestParent::RecvPing()
+bool TestParent::RecvPing()
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
-nsresult TestParent::RecvPong(const int& status)
+bool TestParent::RecvPong(const int& status)
 {
-    printf("[TestParent] child replied to ping with status code %d\n", status);
-    return NS_OK;
+  printf("[TestParent] child replied to ping with status code %d\n", status);
+  return true;
 }
 
-nsresult TestParent::RecvGetValue(const String& key)
+bool TestParent::RecvGetValue(const String& key)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
-nsresult TestParent::RecvGetValues(const StringArray& keys)
+bool TestParent::RecvGetValues(const StringArray& keys)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
-nsresult TestParent::RecvSetValue(
+bool TestParent::RecvSetValue(
             const String& key,
             const String& val,
             bool* ok)
 {
-    return NS_ERROR_NOT_IMPLEMENTED;
+  return false;
 }
 
 #endif
--- a/ipc/test-harness/TestParent.h
+++ b/ipc/test-harness/TestParent.h
@@ -45,27 +45,27 @@ namespace test {
 
 // Header file contents
 class TestParent : public PTestParent
 {
 protected:
 #if 1
 //-----------------------------------------------------------------------------
 // "Hello world" example
-    virtual nsresult RecvWorld();
+    virtual bool RecvWorld();
 
 
 #elif 0
 //-----------------------------------------------------------------------------
 // Example solution to exercise
-    virtual nsresult RecvPing();
-    virtual nsresult RecvPong(const int& status);
-    virtual nsresult RecvGetValue(const String& key);
-    virtual nsresult RecvGetValues(const StringArray& keys);
-    virtual nsresult RecvSetValue(
+    virtual bool RecvPing();
+    virtual bool RecvPong(const int& status);
+    virtual bool RecvGetValue(const String& key);
+    virtual bool RecvGetValues(const StringArray& keys);
+    virtual bool RecvSetValue(
                 const String& key,
                 const String& val,
                 bool* ok);
 #endif
 
 public:
     TestParent();
     virtual ~TestParent();
--- a/ipc/testshell/TestShellChild.cpp
+++ b/ipc/testshell/TestShellChild.cpp
@@ -40,55 +40,49 @@ using mozilla::ipc::TestShellChild;
 using mozilla::ipc::PTestShellCommandChild;
 using mozilla::ipc::XPCShellEnvironment;
 
 TestShellChild::TestShellChild()
 : mXPCShell(XPCShellEnvironment::CreateEnvironment())
 {
 }
 
-nsresult
+bool
 TestShellChild::RecvExecuteCommand(const nsString& aCommand)
 {
   if (mXPCShell->IsQuitting()) {
     NS_WARNING("Commands sent after quit command issued!");
-    return NS_ERROR_UNEXPECTED;
+    return false;
   }
 
-  return mXPCShell->EvaluateString(aCommand) ? NS_OK : NS_ERROR_FAILURE;
+  return mXPCShell->EvaluateString(aCommand);
 }
 
 PTestShellCommandChild*
 TestShellChild::PTestShellCommandConstructor(const nsString& aCommand)
 {
   return new PTestShellCommandChild();
 }
 
-nsresult
+bool
 TestShellChild::PTestShellCommandDestructor(PTestShellCommandChild* aCommand,
                                             const nsString& aResponse)
 {
-  NS_ENSURE_ARG_POINTER(aCommand);
   delete aCommand;
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 TestShellChild::RecvPTestShellCommandConstructor(PTestShellCommandChild* aActor,
                                                  const nsString& aCommand)
 {
-  NS_ASSERTION(aActor, "Shouldn't be null!");
-
   if (mXPCShell->IsQuitting()) {
     NS_WARNING("Commands sent after quit command issued!");
-    return NS_ERROR_UNEXPECTED;
+    return false;
   }
 
   nsString response;
   if (!mXPCShell->EvaluateString(aCommand, &response)) {
-    return NS_ERROR_FAILURE;
+    return false;
   }
 
-  nsresult rv = SendPTestShellCommandDestructor(aActor, response);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return NS_OK;
+  return SendPTestShellCommandDestructor(aActor, response);
 }
--- a/ipc/testshell/TestShellChild.h
+++ b/ipc/testshell/TestShellChild.h
@@ -48,27 +48,27 @@ namespace ipc {
 
 class XPCShellEnvironment;
 
 class TestShellChild : public PTestShellChild
 {
 public:
   TestShellChild();
 
-  nsresult
+  bool
   RecvExecuteCommand(const nsString& aCommand);
 
   PTestShellCommandChild*
   PTestShellCommandConstructor(const nsString& aCommand);
 
-  nsresult
+  bool
   RecvPTestShellCommandConstructor(PTestShellCommandChild* aActor,
                                    const nsString& aCommand);
 
-  nsresult
+  bool
   PTestShellCommandDestructor(PTestShellCommandChild* aCommand,
                               const nsString& aResponse);
 
   void SetXPCShell(XPCShellEnvironment* aXPCShell) {
     mXPCShell = aXPCShell;
   }
 
 private:
--- a/ipc/testshell/TestShellParent.cpp
+++ b/ipc/testshell/TestShellParent.cpp
@@ -43,38 +43,35 @@ using mozilla::ipc::TestShellCommandPare
 using mozilla::ipc::PTestShellCommandParent;
 
 PTestShellCommandParent*
 TestShellParent::PTestShellCommandConstructor(const nsString& aCommand)
 {
   return new TestShellCommandParent();
 }
 
-nsresult
+bool
 TestShellParent::PTestShellCommandDestructor(PTestShellCommandParent* aActor,
                                              const nsString& aResponse)
 {
-  NS_ENSURE_ARG_POINTER(aActor);
   delete aActor;
-  return NS_OK;
+  return true;
 }
 
-nsresult
+bool
 TestShellParent::RecvPTestShellCommandDestructor(PTestShellCommandParent* aActor,
                                                  const nsString& aResponse)
 {
-  NS_ENSURE_ARG_POINTER(aActor);
-
   TestShellCommandParent* command =
     reinterpret_cast<TestShellCommandParent*>(aActor);
 
   JSBool ok = command->RunCallback(aResponse);
   command->ReleaseCallback();
 
-  return NS_OK;
+  return true;
 }
 
 JSBool
 TestShellCommandParent::SetCallback(JSContext* aCx,
                                     jsval aCallback)
 {
   if (!mCallback.Hold(aCx)) {
     return JS_FALSE;
--- a/ipc/testshell/TestShellParent.h
+++ b/ipc/testshell/TestShellParent.h
@@ -65,21 +65,21 @@ private:
 };
 
 class TestShellParent : public PTestShellParent
 {
 public:
   PTestShellCommandParent*
   PTestShellCommandConstructor(const nsString& aCommand);
 
-  nsresult
+  bool
   PTestShellCommandDestructor(PTestShellCommandParent* aActor,
                               const nsString& aResponse);
 
-  nsresult
+  bool
   RecvPTestShellCommandDestructor(PTestShellCommandParent* aActor,
                                   const nsString& aResponse);
 };
 
 } /* namespace ipc */
 } /* namespace mozilla */
 
 #endif /* ipc_testshell_TestShellParent_h */
--- a/netwerk/ipc/NeckoChild.cpp
+++ b/netwerk/ipc/NeckoChild.cpp
@@ -68,17 +68,17 @@ void NeckoChild::InitNeckoChild()
 }
 
 PHttpChannelChild* 
 NeckoChild::PHttpChannelConstructor()
 {
   return new HttpChannelChild();
 }
 
-nsresult 
+bool 
 NeckoChild::PHttpChannelDestructor(PHttpChannelChild* channel)
 {
   delete channel;
-  return NS_OK;
+  return true;
 }
 
 }} // mozilla::net
 
--- a/netwerk/ipc/NeckoChild.h
+++ b/netwerk/ipc/NeckoChild.h
@@ -54,17 +54,17 @@ class NeckoChild :
 {
 public:
   NeckoChild();
   virtual ~NeckoChild();
 
   static void InitNeckoChild();
 
   virtual PHttpChannelChild* PHttpChannelConstructor();
-  virtual nsresult PHttpChannelDestructor(PHttpChannelChild*);
+  virtual bool PHttpChannelDestructor(PHttpChannelChild*);
 
 protected:
 };
 
 /**
  * Reference to the PNecko Child protocol.
  * Null if this is not a content process.
  */
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -54,18 +54,18 @@ NeckoParent::~NeckoParent()
 }
 
 PHttpChannelParent* 
 NeckoParent::PHttpChannelConstructor()
 {
   return new HttpChannelParent();
 }
 
-nsresult 
+bool 
 NeckoParent::PHttpChannelDestructor(PHttpChannelParent* channel)
 {
   delete channel;
-  return NS_OK;
+  return true;
 }
 
 
 }} // mozilla::net
 
--- a/netwerk/ipc/NeckoParent.h
+++ b/netwerk/ipc/NeckoParent.h
@@ -52,15 +52,15 @@ class NeckoParent :
   public PNeckoParent
 {
 public:
   NeckoParent();
   virtual ~NeckoParent();
 
 protected:
   virtual PHttpChannelParent* PHttpChannelConstructor();
-  virtual nsresult PHttpChannelDestructor(PHttpChannelParent*);
+  virtual bool PHttpChannelDestructor(PHttpChannelParent*);
 };
 
 } // namespace net
 } // namespace mozilla
 
 #endif // mozilla_net_NeckoParent_h
--- a/netwerk/protocol/http/src/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/src/HttpChannelParent.cpp
@@ -49,15 +49,16 @@ HttpChannelParent::HttpChannelParent()
 }
 
 HttpChannelParent::~HttpChannelParent()
 {
 }
 
 //-----------------------------------------------------------------------------
 // 
-nsresult HttpChannelParent::RecvasyncOpen(const nsCString& uri)
+bool HttpChannelParent::RecvasyncOpen(const nsCString& uri)
 {
   puts("[HttpChannelParent] got asyncOpen msg");
+  return true;
 }
 
 }} // mozilla::net
 
--- a/netwerk/protocol/http/src/HttpChannelParent.h
+++ b/netwerk/protocol/http/src/HttpChannelParent.h
@@ -50,15 +50,15 @@ namespace net {
 class HttpChannelParent :
   public PHttpChannelParent
 {
 public:
   HttpChannelParent();
   virtual ~HttpChannelParent();
 
 protected:
-  virtual nsresult RecvasyncOpen(const nsCString& uri);
+  virtual bool RecvasyncOpen(const nsCString& uri);
 };
 
 } // namespace net
 } // namespace mozilla
 
 #endif // mozilla_net_HttpChannelParent_h