diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 02c5b3c87cdd..33eb5ce1da20 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -225,8 +225,7 @@ ContentParent::Init() nsCOMPtr threadInt(do_QueryInterface(NS_GetCurrentThread())); if (threadInt) { - threadInt->GetObserver(getter_AddRefs(mOldObserver)); - threadInt->SetObserver(this); + threadInt->AddObserver(this); } if (obs) { obs->NotifyObservers(static_cast(this), "ipc:content-created", nsnull); @@ -344,7 +343,7 @@ ContentParent::ActorDestroy(ActorDestroyReason why) nsCOMPtr threadInt(do_QueryInterface(NS_GetCurrentThread())); if (threadInt) - threadInt->SetObserver(mOldObserver); + threadInt->RemoveObserver(this); if (mRunToCompletionDepth) mRunToCompletionDepth = 0; @@ -1118,11 +1117,9 @@ ContentParent::RecvLoadURIExternal(const IPC::URI& uri) /* void onDispatchedEvent (in nsIThreadInternal thread); */ NS_IMETHODIMP ContentParent::OnDispatchedEvent(nsIThreadInternal *thread) -{ - if (mOldObserver) - return mOldObserver->OnDispatchedEvent(thread); - - return NS_OK; +{ + NS_NOTREACHED("OnDispatchedEvent unimplemented"); + return NS_ERROR_NOT_IMPLEMENTED; } /* void onProcessNextEvent (in nsIThreadInternal thread, in boolean mayWait, in unsigned long recursionDepth); */ @@ -1134,9 +1131,6 @@ ContentParent::OnProcessNextEvent(nsIThreadInternal *thread, if (mRunToCompletionDepth) ++mRunToCompletionDepth; - if (mOldObserver) - return mOldObserver->OnProcessNextEvent(thread, mayWait, recursionDepth); - return NS_OK; } @@ -1156,9 +1150,6 @@ ContentParent::AfterProcessNextEvent(nsIThreadInternal *thread, } } - if (mOldObserver) - return mOldObserver->AfterProcessNextEvent(thread, recursionDepth); - return NS_OK; } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 2876f987f17e..fed87240a993 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -235,7 +235,6 @@ private: PRInt32 mGeolocationWatchID; int mRunToCompletionDepth; bool mShouldCallUnblockChild; - nsCOMPtr mOldObserver; // This is a cache of all of the memory reporters // registered in the child process. To update this, one