mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backed out changeset 767af6517e3e (bug 1310547)
This commit is contained in:
parent
e6bf7d1cfa
commit
d1ca5ed701
@ -1737,10 +1737,6 @@ ChildImpl::CloseForCurrentThread()
|
||||
threadLocalInfo->mClosed = true;
|
||||
#endif
|
||||
|
||||
if (threadLocalInfo->mActor) {
|
||||
threadLocalInfo->mActor->FlushPendingInterruptQueue();
|
||||
}
|
||||
|
||||
// Clearing the thread local will synchronously close the actor.
|
||||
DebugOnly<PRStatus> status = PR_SetThreadPrivate(sThreadLocalIndex, nullptr);
|
||||
MOZ_ASSERT(status == PR_SUCCESS);
|
||||
|
@ -1783,28 +1783,6 @@ MessageChannel::MaybeUndeferIncall()
|
||||
mPending.push_back(Move(call));
|
||||
}
|
||||
|
||||
void
|
||||
MessageChannel::FlushPendingInterruptQueue()
|
||||
{
|
||||
AssertWorkerThread();
|
||||
mMonitor->AssertNotCurrentThreadOwns();
|
||||
|
||||
{
|
||||
MonitorAutoLock lock(*mMonitor);
|
||||
|
||||
if (mDeferred.empty()) {
|
||||
if (mPending.empty())
|
||||
return;
|
||||
|
||||
const Message& last = mPending.back();
|
||||
if (!last.is_interrupt() || last.is_reply())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while (OnMaybeDequeueOne());
|
||||
}
|
||||
|
||||
void
|
||||
MessageChannel::ExitedCxxStack()
|
||||
{
|
||||
|
@ -183,8 +183,6 @@ class MessageChannel : HasResultCodes
|
||||
*/
|
||||
int32_t GetTopmostMessageRoutingId() const;
|
||||
|
||||
void FlushPendingInterruptQueue();
|
||||
|
||||
// Unsound_IsClosed and Unsound_NumQueuedMessages are safe to call from any
|
||||
// thread, but they make no guarantees about whether you'll get an
|
||||
// up-to-date value; the values are written on one thread and read without
|
||||
|
@ -3334,14 +3334,9 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
onstack.addstmt(StmtReturn(ExprCall(
|
||||
ExprSelect(p.channelVar(), '.', p.onCxxStackVar().name))))
|
||||
|
||||
# void ProcessIncomingRacingInterruptCall
|
||||
processincoming = MethodDefn(
|
||||
MethodDecl('FlushPendingInterruptQueue', ret=Type.VOID))
|
||||
processincoming.addstmt(StmtExpr(ExprCall(ExprSelect(_actorChannel(ExprVar.THIS), '.', 'FlushPendingInterruptQueue'))))
|
||||
|
||||
self.cls.addstmts([ onentered, onexited,
|
||||
onenteredcall, onexitedcall,
|
||||
onstack, processincoming, Whitespace.NL ])
|
||||
onstack, Whitespace.NL ])
|
||||
|
||||
# OnChannelClose()
|
||||
onclose = MethodDefn(MethodDecl('OnChannelClose'))
|
||||
|
Loading…
Reference in New Issue
Block a user