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

Issue 2624463003: Address 2 crashes in download attribution code (Closed)

Created:
3 years, 11 months ago by Jialiu Lin
Modified:
3 years, 11 months ago
Reviewers:
Nathan Parker
CC:
chromium-reviews, grt+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Address 2 crashes in download attribution code. crbug.com/676675 Out of memory crash caused by memory alloc inside vector::push_back(). Since vector grows its internal buffer following some kind of geometric progression, it makes more sense to keep pointers inside the vector instead of actual objects. Therefore, change the vector<ReferrerChainEntry> into vector<unique_ptr<ReferrerChainEntry>>. This will help with the memory allocation inside push_back() function. crbug.com/679252 Add additional check on the return of FindNavigationEvent() function to make suer it is valid. BUG=676675, 679252 Review-Url: https://codereview.chromium.org/2624463003 Cr-Commit-Position: refs/heads/master@{#442780} Committed: https://chromium.googlesource.com/chromium/src/+/d1bf4b965304fb16a99edbd7268dd9ab9a41c76b

Patch Set 1 #

Total comments: 10

Patch Set 2 : address comments from nparker@ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -147 lines) Patch
M chrome/browser/safe_browsing/download_protection_service.cc View 1 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc View 1 48 chunks +143 lines, -119 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h View 4 chunks +9 lines, -9 lines 1 comment Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc View 6 chunks +15 lines, -13 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
Jialiu Lin
Hi nparker@, Could you take a look? Thanks! https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc File chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc (left): https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc#oldcode400 chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc:400: if ...
3 years, 11 months ago (2017-01-09 23:23:04 UTC) #8
Nathan Parker
https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/download_protection_service.cc#newcode1850 chrome/browser/safe_browsing/download_protection_service.cc:1850: for (auto it = attribution_chain.begin(); it != attribution_chain.end(); it++) ...
3 years, 11 months ago (2017-01-10 01:25:13 UTC) #9
Jialiu Lin
Thanks! https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2624463003/diff/1/chrome/browser/safe_browsing/download_protection_service.cc#newcode1850 chrome/browser/safe_browsing/download_protection_service.cc:1850: for (auto it = attribution_chain.begin(); it != attribution_chain.end(); ...
3 years, 11 months ago (2017-01-10 02:15:12 UTC) #11
Jialiu Lin
any further comments, nparker@?
3 years, 11 months ago (2017-01-10 23:14:19 UTC) #12
Nathan Parker
lgtm https://codereview.chromium.org/2624463003/diff/40001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h File chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h (right): https://codereview.chromium.org/2624463003/diff/40001/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h#newcode35 chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h:35: typedef std::vector<std::unique_ptr<ReferrerChainEntry>> ReferrerChain; One idea: Could this be ...
3 years, 11 months ago (2017-01-11 01:32:32 UTC) #13
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/2624463003/40001
3 years, 11 months ago (2017-01-11 01:55:24 UTC) #15
commit-bot: I haz the power
3 years, 11 months ago (2017-01-11 03:35:30 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/d1bf4b965304fb16a99edbd7268d...

Powered by Google App Engine
This is Rietveld 408576698