Closed
Bug 547881
Opened 15 years ago
Closed 15 years ago
need to serialize/deserialize gfxMatrix
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: joe, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
This patch allows us to serialize instances of gfxMatrix.
Reporter | ||
Updated•15 years ago
|
Attachment #428326 -
Attachment is patch: true
Attachment #428326 -
Attachment mime type: application/octet-stream → text/plain
Attachment #428326 -
Flags: review?(jones.chris.g)
Comment on attachment 428326 [details] [diff] [review]
serialize gfxMatrix
>diff --git a/ipc/glue/IPCMessageUtils.h b/ipc/glue/IPCMessageUtils.h
>--- a/ipc/glue/IPCMessageUtils.h
>+++ b/ipc/glue/IPCMessageUtils.h
>+template<>
>+struct ParamTraits<gfxMatrix>
>+{
>+ static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
>+ {
>+ if (!ReadParam(aMsg, aIter, &aResult->xx))
>+ return false;
>+ if (!ReadParam(aMsg, aIter, &aResult->xy))
>+ return false;
>+ if (!ReadParam(aMsg, aIter, &aResult->yx))
>+ return false;
>+ if (!ReadParam(aMsg, aIter, &aResult->yy))
>+ return false;
>+ if (!ReadParam(aMsg, aIter, &aResult->x0))
>+ return false;
>+ if (!ReadParam(aMsg, aIter, &aResult->y0))
>+ return false;
>+
>+ return true;
>+ }
>+
Nit: I prefer
return ReadParam(aMsg, aIter, &aResult->xx) &&
ReadParam(aMsg, aIter, &aResult->xy) &&
...
Attachment #428326 -
Flags: review?(jones.chris.g) → review+
Comment 2•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/15cb4be209b3
w/ nits fixed.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 3•15 years ago
|
||
I think you made a mistake when fixing the nit, it now says:
if (...)
return true;
return true;
Comment 4•15 years ago
|
||
Thanks for catching that mistake. De Morgan is crying for me!
http://hg.mozilla.org/mozilla-central/rev/7bf0383f6f62
Reporter | ||
Comment 5•15 years ago
|
||
Not or me.
You need to log in
before you can comment on or make changes to this bug.
Description
•