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}
Showing
This diff is collapsed.
Please register or sign in to comment