Closed
Bug 1424875
Opened 6 years ago
Closed 6 years ago
[Static Analysis] Big parameter passed by value in NotifyManyVisitsObservers and NotifyVisit
Categories
(Firefox :: Migration, enhancement)
Firefox
Migration
Tracking
()
RESOLVED
DUPLICATE
of bug 1423612
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1425899)
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Details |
Now we pass |aPlace| by value in:
>> explicit NotifyManyVisitsObservers(VisitData aPlace)
>> : Runnable("places::NotifyManyVisitsObservers")
>> , mPlace(aPlace)
>> , mHistory(History::GetService())
>> {
>> }
Since the size is around 160bytes why don't we pass it as const VisitData& and we avoid one copy of the object.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•6 years ago
|
||
Look a bit more around the code the same reason can be applied here:
>> nsresult NotifyVisit(nsNavHistory* aNavHistory,
>> nsCOMPtr<nsIObserverService>& aObsService,
>> PRTime aNow,
>> VisitData aPlace)
Assignee | ||
Updated•6 years ago
|
Summary: [Static Analysis] Big parameter passed by value in NotifyManyVisitsObservers → [Static Analysis] Big parameter passed by value in NotifyManyVisitsObservers and NotifyVisit
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
This is a duplicate of bug 1423612. The patch is the same.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8936393 [details] Bug 1424875 - pass aPlace as const& in NotifyManyVisitsObservers and NotifyVisit. https://reviewboard.mozilla.org/r/207118/#review213268
Updated•6 years ago
|
Attachment #8936393 -
Flags: review?(mak77)
You need to log in
before you can comment on or make changes to this bug.
Description
•