Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Issue 10823385: [Coverity] Pass-by-ref instead of pass-by-val (Closed)

Created:
8 years, 4 months ago by groby-ooo-7-16
Modified:
8 years, 3 months ago
Reviewers:
Nico, sky
CC:
chromium-reviews
Visibility:
Public.

Description

[Coverity] Pass-by-ref instead of pass-by-val CID=104687,104688 CID_COUNT=2 R=sky@chromium.org BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152430

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M chrome/browser/favicon/select_favicon_frames.cc View 2 chunks +4 lines, -2 lines 2 comments Download

Messages

Total messages: 6 (0 generated)
groby-ooo-7-16
8 years, 4 months ago (2012-08-17 04:21:09 UTC) #1
sky
LGTM
8 years, 4 months ago (2012-08-20 14:25:19 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/groby@chromium.org/10823385/1
8 years, 4 months ago (2012-08-20 20:38:31 UTC) #3
commit-bot: I haz the power
Change committed as 152430
8 years, 4 months ago (2012-08-20 23:48:56 UTC) #4
Nico
https://chromiumcodereview.appspot.com/10823385/diff/1/chrome/browser/favicon/select_favicon_frames.cc File chrome/browser/favicon/select_favicon_frames.cc (right): https://chromiumcodereview.appspot.com/10823385/diff/1/chrome/browser/favicon/select_favicon_frames.cc#newcode27 chrome/browser/favicon/select_favicon_frames.cc:27: SkBitmap PadWithBorder(const SkBitmap& contents, SkBitmaps are refcounted and by ...
8 years, 3 months ago (2012-09-19 10:29:16 UTC) #5
sky
8 years, 3 months ago (2012-09-19 14:25:05 UTC) #6
https://chromiumcodereview.appspot.com/10823385/diff/1/chrome/browser/favicon...
File chrome/browser/favicon/select_favicon_frames.cc (right):

https://chromiumcodereview.appspot.com/10823385/diff/1/chrome/browser/favicon...
chrome/browser/favicon/select_favicon_frames.cc:27: SkBitmap PadWithBorder(const
SkBitmap& contents,
On 2012/09/19 10:29:16, Nico wrote:
> SkBitmaps are refcounted and by design very cheap to copy. We rely on this
> property in many places. I intentionally didn't pass them by ref. (Not that
> doing it hurts much either, but it's more code and unnecessary.)

We should still pass by ref if possible.

Powered by Google App Engine
This is Rietveld 408576698