Bug 1159037: Ensure correct parent and child message are passed to MessageListener::MediateInterruptRace; r=dvander

--HG--
extra : rebase_source : d0c50c69b8124ea1993b823ceadccf28ac91fd6b
This commit is contained in:
Aaron Klotz 2015-04-27 17:24:07 -06:00
parent b2cc193b4e
commit 28a06e03b9

View File

@ -1266,8 +1266,9 @@ MessageChannel::DispatchInterruptMessage(const Message& aMsg, size_t stackDepth)
// processing of the other side's in-call.
bool defer;
const char* winner;
switch (mListener->MediateInterruptRace((mSide == ChildSide) ? aMsg : mInterruptStack.top(),
(mSide != ChildSide) ? mInterruptStack.top() : aMsg))
const Message& parentMsg = (mSide == ChildSide) ? aMsg : mInterruptStack.top();
const Message& childMsg = (mSide == ChildSide) ? mInterruptStack.top() : aMsg;
switch (mListener->MediateInterruptRace(parentMsg, childMsg))
{
case RIPChildWins:
winner = "child";