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

Issue 2548363010: Omnibox - Refactor |relevance_buckets| to Remove Memory Leak on Exit (Closed)

Created:
4 years ago by Mark P
Modified:
4 years ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox - Refactor |relevance_buckets| to Remove Memory Leak on Exit A static class variable was new-ed with no opportunity for a delete call. Instead, convert this to using CR_DEFINE_STATIC_LOCAL so it's properly deleted on exit. Removes ExperimentalScoringEnabled() field trial function and changed the default value for the topicality threshold when the field trial setting is erroneous or partially-specified. I checked that removing this logic change does not affect any currently- or recently-running experiments. Other than changing the semantics of the field trial configs, there should be no functional changes. In the process, remove most references to HQP in variable names and comments. These references are unnecessary. All scoring in these files are for the HQP. BUG= Committed: https://crrev.com/9007c3fbec7e2fb0d2f2f3f5d026046a56b71e13 Cr-Commit-Position: refs/heads/master@{#438006}

Patch Set 1 #

Patch Set 2 : polish #

Total comments: 23

Patch Set 3 : pkasting's comments #

Patch Set 4 : polish #

Total comments: 11

Patch Set 5 : ipeter's comments #

Patch Set 6 : 0.8 -> 0.8f #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -172 lines) Patch
M components/omnibox/browser/omnibox_field_trial.h View 1 2 3 4 2 chunks +7 lines, -15 lines 0 comments Download
M components/omnibox/browser/omnibox_field_trial.cc View 1 2 3 4 5 2 chunks +6 lines, -20 lines 0 comments Download
M components/omnibox/browser/scored_history_match.h View 1 2 3 4 3 chunks +29 lines, -38 lines 0 comments Download
M components/omnibox/browser/scored_history_match.cc View 1 2 3 4 7 chunks +52 lines, -77 lines 0 comments Download
M components/omnibox/browser/scored_history_match_unittest.cc View 1 2 3 4 1 chunk +19 lines, -22 lines 0 comments Download

Messages

Total messages: 29 (14 generated)
Mark P
There's a currently-leak variable in scored_history_match. This changelist cleans it up using CR_DEFINE_STATIC_LOCAL. It's a ...
4 years ago (2016-12-07 22:39:27 UTC) #4
Peter Kasting
https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc File components/omnibox/browser/scored_history_match.cc (right): https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc#newcode40 components/omnibox/browser/scored_history_match.cc:40: "0.0:400,1.5:600,5.0:900,10.5:1203,15.0:1300,20.0:1399"; Nit: Since both these constants are only used ...
4 years ago (2016-12-08 01:29:22 UTC) #5
Mark P
https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc File components/omnibox/browser/scored_history_match.cc (right): https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc#newcode40 components/omnibox/browser/scored_history_match.cc:40: "0.0:400,1.5:600,5.0:900,10.5:1203,15.0:1300,20.0:1399"; On 2016/12/08 01:29:21, Peter Kasting wrote: > Nit: ...
4 years ago (2016-12-09 20:40:56 UTC) #7
Peter Kasting
LGTM https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc File components/omnibox/browser/scored_history_match.cc (right): https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc#newcode40 components/omnibox/browser/scored_history_match.cc:40: "0.0:400,1.5:600,5.0:900,10.5:1203,15.0:1300,20.0:1399"; On 2016/12/09 20:40:56, Mark P wrote: > ...
4 years ago (2016-12-10 02:31:15 UTC) #8
Mark P
https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc File components/omnibox/browser/scored_history_match.cc (right): https://codereview.chromium.org/2548363010/diff/20001/components/omnibox/browser/scored_history_match.cc#newcode40 components/omnibox/browser/scored_history_match.cc:40: "0.0:400,1.5:600,5.0:900,10.5:1203,15.0:1300,20.0:1399"; On 2016/12/10 02:31:15, Peter Kasting wrote: > On ...
4 years ago (2016-12-11 04:57:23 UTC) #9
Peter Kasting
https://codereview.chromium.org/2548363010/diff/60001/components/omnibox/browser/scored_history_match.h File components/omnibox/browser/scored_history_match.h (right): https://codereview.chromium.org/2548363010/diff/60001/components/omnibox/browser/scored_history_match.h#newcode34 components/omnibox/browser/scored_history_match.h:34: typedef std::vector<ScoreMaxRelevance> ScoreMaxRelevances; On 2016/12/11 04:57:22, Mark P wrote: ...
4 years ago (2016-12-11 06:00:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2548363010/80001
4 years ago (2016-12-12 04:48:19 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/347939)
4 years ago (2016-12-12 05:31:52 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2548363010/100001
4 years ago (2016-12-12 22:33:12 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/331621) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years ago (2016-12-13 00:35:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2548363010/100001
4 years ago (2016-12-13 00:40:15 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-13 02:58:02 UTC) #25
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/9007c3fbec7e2fb0d2f2f3f5d026046a56b71e13 Cr-Commit-Position: refs/heads/master@{#438006}
4 years ago (2016-12-13 02:59:46 UTC) #27
Peter Kasting
BTW, I forgot to ever write this before, but your CL description is technically incorrect. ...
4 years ago (2016-12-13 22:00:26 UTC) #28
Mark P
4 years ago (2016-12-13 23:09:30 UTC) #29
Message was sent while issue was closed.
On Tue, Dec 13, 2016 at 2:00 PM, <pkasting@chromium.org> wrote:

> BTW, I forgot to ever write this before, but your CL description is
> technically
> incorrect. Using CR_DEFINE_STATIC_LOCAL doesn't result in objects being
> cleaned
> up on exit. It basically just makes it clear that this memory leak is
> intentional, and tools and readers don't need to freak out about it.
>

Thanks for the clarification.  I didn't know that.

--mark


>
> https://codereview.chromium.org/2548363010/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698