Closed Bug 1246100 Opened 4 years ago Closed 4 years ago
[Static Analysis][Big parameter passed by value] In Function Mock
Web Browser Print
The Static Analysis tool Coverity added aData is passed to contructor MockWebBrowserPrint by value: >> explicit MockWebBrowserPrint(const PrintData aData); The size of PrintData is around 560 bytes, more or less depending on platform data alignment. We could modify this by passing aData as PrintData& and than passing it to mData that calls the copy constructor: >> MOZ_IMPLICIT PrintData(const PrintData& _o) Thus we can avoid the first copy of PrinData on the stack of MockWebBrowserPrint's constructor.
You need to log in before you can comment on or make changes to this bug.