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

Issue 1581963004: Do not use invalidated std::map::iterators in PDF_ReplaceAbbr(). (Closed)

Created:
4 years, 11 months ago by Lei Zhang
Modified:
4 years, 11 months ago
Reviewers:
Oliver Chang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Do not use invalidated std::map::iterators in PDF_ReplaceAbbr(). Avoid invalidating iterators by deferring the std::map operations. Also remove unused PDF_ReplaceFull(). BUG=577030 R=ochang@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/5d1070dc642800242ec2e9d9d74aa1e5715d2b62

Patch Set 1 #

Patch Set 2 : remove dead code too #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -60 lines) Patch
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 5 chunks +23 lines, -60 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Lei Zhang
4 years, 11 months ago (2016-01-13 23:43:54 UTC) #2
Oliver Chang
lgtm, thanks for fixing this. I'll take care of the remaining occurrences.
4 years, 11 months ago (2016-01-13 23:54:42 UTC) #3
Oliver Chang
actually, PDF_ReplaceFull needs a similar change...
4 years, 11 months ago (2016-01-14 00:07:52 UTC) #4
Oliver Chang
and these functions recurse too... i'll try to address this in my CL too unless ...
4 years, 11 months ago (2016-01-14 00:18:35 UTC) #5
Oliver Chang
On 2016/01/14 00:18:35, Oliver Chang wrote: > and these functions recurse too... i'll try to ...
4 years, 11 months ago (2016-01-14 00:22:02 UTC) #6
Lei Zhang
On 2016/01/14 00:07:52, Oliver Chang wrote: > actually, PDF_ReplaceFull needs a similar change... PDF_ReplaceFull() is ...
4 years, 11 months ago (2016-01-14 01:00:52 UTC) #7
Lei Zhang
Committed patchset #3 (id:40001) manually as 5d1070dc642800242ec2e9d9d74aa1e5715d2b62 (presubmit successful).
4 years, 11 months ago (2016-01-14 01:04:39 UTC) #10
Lei Zhang
On 2016/01/14 00:18:35, Oliver Chang wrote: > and these functions recurse too... i'll try to ...
4 years, 11 months ago (2016-01-14 01:15:02 UTC) #11
Oliver Chang
4 years, 11 months ago (2016-01-14 01:19:00 UTC) #12
Message was sent while issue was closed.
On 2016/01/14 01:15:02, Lei Zhang wrote:
> On 2016/01/14 00:18:35, Oliver Chang wrote:
> > and these functions recurse too... i'll try to address this in my CL too
> unless
> > you're already on it.
> 
> Oh, I already landed before I got a chance to look at your CL. Hope you don't
> mind. You can always undo this CL in yours.

Or we could just keep yours :)

Powered by Google App Engine
This is Rietveld 408576698