Closed
Bug 547881
Opened 14 years ago
Closed 14 years ago
need to serialize/deserialize gfxMatrix
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: joe, Unassigned)
References
Details
Attachments
(1 file)
1.79 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
This patch allows us to serialize instances of gfxMatrix.
Reporter | ||
Updated•14 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•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/15cb4be209b3 w/ nits fixed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 3•14 years ago
|
||
I think you made a mistake when fixing the nit, it now says: if (...) return true; return true;
Comment 4•14 years ago
|
||
Thanks for catching that mistake. De Morgan is crying for me! http://hg.mozilla.org/mozilla-central/rev/7bf0383f6f62
Reporter | ||
Comment 5•14 years ago
|
||
Not or me.
You need to log in
before you can comment on or make changes to this bug.
Description
•