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

Issue 7029038: Remove default initializtion of BirthPlace in Tracked. (Closed)

Created:
9 years, 7 months ago by awong
Modified:
9 years, 6 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Remove default initializtion of BirthPlace in Tracked. Previously, MessageLoop::PostTask set the BirthPlace of the Task object (subclass of Tracked), which would decrement the counter for the Location("NoFunctionName", "NeedToSetBirthPlace", -1) Birth, and replace it with a more appropriate Location provided by the FROM_HERE argument. With the MessageLoop restructuring in r82300, tracking of Births is moved up from the Task object into the MessageLoop::PendingTask structure. The side-effect is that the default birth is never decremented, and we double count each task's creation. This default Birth is effectively a count of "tasks that were created, but not posted" without a stored reference to location, so removing it is the simplest fix to the double counting. BUG=none TEST=about:tasks looks sane. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90290

Patch Set 1 #

Total comments: 1

Patch Set 2 : address Jim's comment. #

Patch Set 3 : Fix unittests that were characterizing behavior. #

Patch Set 4 : copyright fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M base/tracked.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M base/tracked_objects_unittest.cc View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jar (doing other things)
LGTM... with additional delete below. Thanks! http://codereview.chromium.org/7029038/diff/1/base/tracked.cc File base/tracked.cc (left): http://codereview.chromium.org/7029038/diff/1/base/tracked.cc#oldcode82 base/tracked.cc:82: SetBirthPlace(Location("NoFunctionName", "NeedToSetBirthPlace", -1)); ...
9 years, 7 months ago (2011-05-18 20:46:08 UTC) #1
awong
Darin, can you give a OWNERS stamp?
9 years, 6 months ago (2011-06-23 21:42:46 UTC) #2
darin (slow to review)
LGTM
9 years, 6 months ago (2011-06-23 23:10:17 UTC) #3
jar (doing other things)
9 years, 6 months ago (2011-06-24 02:22:22 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698