зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 690fcdc70b82 (bug 1362732) for build bustage at MessageChannel.cpp: bad implicit conversion constructor for 'AbstractThreadWrapperCleanup'
CLOSED TREE
This commit is contained in:
Родитель
9fe44a8f68
Коммит
84c8672878
|
@ -746,23 +746,6 @@ MessageChannel::Clear()
|
|||
}
|
||||
}
|
||||
|
||||
class AbstractThreadWrapperCleanup : public MessageLoop::DestructionObserver
|
||||
{
|
||||
public:
|
||||
AbstractThreadWrapperCleanup(already_AddRefed<AbstractThread> aWrapper)
|
||||
: mWrapper(aWrapper)
|
||||
{}
|
||||
virtual ~AbstractThreadWrapperCleanup() override {}
|
||||
virtual void WillDestroyCurrentMessageLoop() override
|
||||
{
|
||||
mWrapper = nullptr;
|
||||
MessageLoop::current()->RemoveDestructionObserver(this);
|
||||
delete this;
|
||||
}
|
||||
private:
|
||||
RefPtr<AbstractThread> mWrapper;
|
||||
};
|
||||
|
||||
bool
|
||||
MessageChannel::Open(Transport* aTransport, MessageLoop* aIOLoop, Side aSide)
|
||||
{
|
||||
|
@ -774,9 +757,7 @@ MessageChannel::Open(Transport* aTransport, MessageLoop* aIOLoop, Side aSide)
|
|||
mWorkerLoop->AddDestructionObserver(this);
|
||||
|
||||
if (!AbstractThread::GetCurrent()) {
|
||||
mWorkerLoop->AddDestructionObserver(
|
||||
new AbstractThreadWrapperCleanup(
|
||||
MessageLoopAbstractThreadWrapper::Create(mWorkerLoop)));
|
||||
mAbstractThread = MessageLoopAbstractThreadWrapper::Create(mWorkerLoop);
|
||||
}
|
||||
|
||||
|
||||
|
@ -859,9 +840,7 @@ MessageChannel::CommonThreadOpenInit(MessageChannel *aTargetChan, Side aSide)
|
|||
mWorkerLoop->AddDestructionObserver(this);
|
||||
|
||||
if (!AbstractThread::GetCurrent()) {
|
||||
mWorkerLoop->AddDestructionObserver(
|
||||
new AbstractThreadWrapperCleanup(
|
||||
MessageLoopAbstractThreadWrapper::Create(mWorkerLoop)));
|
||||
mAbstractThread = MessageLoopAbstractThreadWrapper::Create(mWorkerLoop);
|
||||
}
|
||||
|
||||
mLink = new ThreadLink(this, aTargetChan);
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include <stack>
|
||||
|
||||
namespace mozilla {
|
||||
class AbstractThread;
|
||||
|
||||
namespace ipc {
|
||||
|
||||
class MessageChannel;
|
||||
|
@ -556,6 +558,7 @@ class MessageChannel : HasResultCodes, MessageLoop::DestructionObserver
|
|||
Side mSide;
|
||||
MessageLink* mLink;
|
||||
MessageLoop* mWorkerLoop; // thread where work is done
|
||||
RefPtr<AbstractThread> mAbstractThread;
|
||||
RefPtr<CancelableRunnable> mChannelErrorTask; // NotifyMaybeChannelError runnable
|
||||
|
||||
// id() of mWorkerLoop. This persists even after mWorkerLoop is cleared
|
||||
|
|
Загрузка…
Ссылка в новой задаче