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

Issue 7978044: Sync/Valgrind: Add gmock printers for SyncChange, SyncData, SyncError. (Closed)

Created:
9 years, 3 months ago by James Hawkins
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), tim (not reviewing), idana
Visibility:
Public.

Description

Sync/Valgrind: Add gmock printers for SyncChange, SyncData, SyncError. Fixes a valgrind error in AutofillProfileSyncableServiceTest.ActOnChange which uses gmock to mock a method that uses these classes. Due to alignment issues, SyncData.is_valid_ has 3 bytes of uninitalized padding. The default gmock printer prints all of these bytes, which causes the uninit access. BUG=none TEST=Green memory waterfall R=akalin@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102407

Patch Set 1 #

Total comments: 12

Patch Set 2 : Review fixes. #

Total comments: 12

Patch Set 3 : Review fixes 2. #

Total comments: 12

Patch Set 4 : Review fixes 3. #

Patch Set 5 : Review fixes 3. #

Total comments: 2

Patch Set 6 : More. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -0 lines) Patch
M chrome/browser/sync/api/sync_change.h View 1 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/sync_change.cc View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/sync_data.h View 1 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/sync_data.cc View 1 2 3 4 5 2 chunks +32 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/sync_error.h View 1 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/sync_error.cc View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
James Hawkins
9 years, 3 months ago (2011-09-21 23:00:34 UTC) #1
James Hawkins
CC: oshima
9 years, 3 months ago (2011-09-21 23:01:10 UTC) #2
akalin
http://codereview.chromium.org/7978044/diff/1/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/1/chrome/browser/sync/api/sync_change.cc#newcode68 chrome/browser/sync/api/sync_change.cc:68: "{" << sync_change.change_type() << use ChangeTypeToString http://codereview.chromium.org/7978044/diff/1/chrome/browser/sync/api/sync_change.h File chrome/browser/sync/api/sync_change.h ...
9 years, 3 months ago (2011-09-21 23:12:58 UTC) #3
James Hawkins
http://codereview.chromium.org/7978044/diff/1/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/1/chrome/browser/sync/api/sync_change.cc#newcode68 chrome/browser/sync/api/sync_change.cc:68: "{" << sync_change.change_type() << On 2011/09/21 23:12:58, akalin wrote: ...
9 years, 3 months ago (2011-09-22 01:15:25 UTC) #4
akalin
http://codereview.chromium.org/7978044/diff/1008/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/1008/chrome/browser/sync/api/sync_change.cc#newcode7 chrome/browser/sync/api/sync_change.cc:7: #include <iostream> iostream -> ostream http://codereview.chromium.org/7978044/diff/1008/chrome/browser/sync/api/sync_data.cc File chrome/browser/sync/api/sync_data.cc (right): ...
9 years, 3 months ago (2011-09-22 01:24:56 UTC) #5
James Hawkins
http://codereview.chromium.org/7978044/diff/1008/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/1008/chrome/browser/sync/api/sync_change.cc#newcode7 chrome/browser/sync/api/sync_change.cc:7: #include <iostream> On 2011/09/22 01:24:56, akalin wrote: > iostream ...
9 years, 3 months ago (2011-09-22 02:50:29 UTC) #6
akalin
Few more. Almost there! http://codereview.chromium.org/7978044/diff/6002/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/6002/chrome/browser/sync/api/sync_change.cc#newcode66 chrome/browser/sync/api/sync_change.cc:66: return "{" + ChangeTypeToString(change_type_) + ...
9 years, 3 months ago (2011-09-22 02:59:44 UTC) #7
akalin
Ping! I have some changes that could use ToString(). On 2011/09/22 02:59:44, akalin wrote: > ...
9 years, 3 months ago (2011-09-22 20:26:01 UTC) #8
James Hawkins
http://codereview.chromium.org/7978044/diff/6002/chrome/browser/sync/api/sync_change.cc File chrome/browser/sync/api/sync_change.cc (right): http://codereview.chromium.org/7978044/diff/6002/chrome/browser/sync/api/sync_change.cc#newcode66 chrome/browser/sync/api/sync_change.cc:66: return "{" + ChangeTypeToString(change_type_) + On 2011/09/22 02:59:44, akalin ...
9 years, 3 months ago (2011-09-22 21:01:58 UTC) #9
akalin
LGTM after comments below Also looks like you need to sync to head http://codereview.chromium.org/7978044/diff/12001/chrome/browser/sync/api/sync_data.cc File ...
9 years, 3 months ago (2011-09-22 21:12:42 UTC) #10
commit-bot: I haz the power
CQ is trying tha patch. Follow status at https://chromium-status.appspot.com/cq/jhawkins@chromium.org/7978044/15001
9 years, 3 months ago (2011-09-22 22:35:40 UTC) #11
commit-bot: I haz the power
Change committed as 102407
9 years, 3 months ago (2011-09-23 00:34:37 UTC) #12
oshima
9 years, 3 months ago (2011-09-24 03:08:45 UTC) #13
On 2011/09/23 00:34:37, I haz the power (commit-bot) wrote:
> Change committed as 102407

James, which bug/memory issue this was supposed to fix? I'll try to remove
suppression. thanks.

Powered by Google App Engine
This is Rietveld 408576698