Bug 850270 - write a request's rectangle directly in nsDOMNotifyPaintEvent; r=smaug

This commit is contained in:
Nathan Froyd 2013-03-12 13:26:48 -04:00
parent 6a95a1b610
commit e21cdea3c4

View File

@ -128,10 +128,7 @@ nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
uint32_t length = mInvalidateRequests.Length();
IPC::WriteParam(aMsg, length);
for (uint32_t i = 0; i < length; ++i) {
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect.x);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect.y);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect.width);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect.height);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mFlags);
}
}
@ -146,10 +143,7 @@ nsDOMNotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
mInvalidateRequests.SetCapacity(length);
for (uint32_t i = 0; i < length; ++i) {
nsInvalidateRequestList::Request req;
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect.x), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect.y), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect.width), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect.height), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mFlags), false);
mInvalidateRequests.AppendElement(req);
}