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

Issue 10925: Fix erase method usage on STL containers in Chrome. Invoking erase on the ite... (Closed)

Created:
12 years, 1 month ago by ananta
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix erase method usage on STL containers in Chrome. Invoking erase on the iterator renders it invalid. We were continuing to use this iterator. R=darin Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=5531

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -5 lines) Patch
M chrome/browser/importer/firefox_importer_utils.cc View 1 2 3 4 5 6 3 chunks +7 lines, -2 lines 1 comment Download
M chrome/browser/resource_dispatcher_host.h View 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/resource_dispatcher_host.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/views/tabbed_pane.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
ananta
12 years, 1 month ago (2008-11-14 02:20:59 UTC) #1
Peter Kasting
Thanks for this fix, it should definitely help with memory corruption. http://codereview.chromium.org/10925/diff/201/207 File chrome/browser/importer/firefox_importer_utils.cc (right): ...
12 years, 1 month ago (2008-11-14 02:30:19 UTC) #2
ananta
Hi Peter Thanks for the comments. I have updated the CB. Please take another look. ...
12 years, 1 month ago (2008-11-14 02:43:30 UTC) #3
ananta
It looks like invoking the postfix increment operator on an iterator being erased is legit. ...
12 years, 1 month ago (2008-11-14 17:31:20 UTC) #4
darin (slow to review)
LGTM
12 years, 1 month ago (2008-11-14 18:18:22 UTC) #5
Peter Kasting
LGTM with tiny nits below, but I would like you to put back your changes ...
12 years, 1 month ago (2008-11-14 20:25:14 UTC) #6
MAD
Did I miss something or... ??? BYE MAD http://codereview.chromium.org/10925/diff/29/31 File chrome/browser/importer/firefox_importer_utils.cc (right): http://codereview.chromium.org/10925/diff/29/31#newcode222 Line 222: ...
11 years, 10 months ago (2009-02-26 18:13:24 UTC) #7
Peter Kasting
11 years, 10 months ago (2009-02-26 18:29:44 UTC) #8
On 2009/02/26 18:13:24, mad wrote:
> http://codereview.chromium.org/10925/diff/29/31#newcode222
> Line 222: need_to_increment_iter = false;
> This is not the same iter as the one used for the loop...
> So this fix introduced bug http://crbug.com/2569...
> Could I simply revert this change? I don't think it was fixing anything
here...

You're right, this fix was bogus.  Heh.

Leave the other three files, and I'd revert this one.  When you do, can you also
change the inner variable to not be named the same as the outer one?  How
confusing.

Powered by Google App Engine
This is Rietveld 408576698