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

Issue 457028: Ok, here is a different approach at this change. (Closed)

Created:
11 years ago by Aaron Boodman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Ok, here is a different approach at this change. Instead of storing pointers into a vector, store offsets. That way, if the vector resizes, we should still be OK. Also, add a DCHECK that we only enter this method once, which is my current assumption. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33541

Patch Set 1 #

Patch Set 2 : new new approach #

Patch Set 3 : be paranoid #

Total comments: 2

Patch Set 4 : different approach #

Patch Set 5 : Be even more paranoid #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -65 lines) Patch
M chrome/app/breakpad_win.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/app/breakpad_win.cc View 1 2 3 4 4 chunks +74 lines, -65 lines 0 comments Download
M chrome/browser/extensions/extensions_service.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extensions_service.cc View 5 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging.h View 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging_linux.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging_mac.mm View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging_win.cc View 3 chunks +25 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 3 chunks +22 lines, -0 lines 0 comments Download
M chrome/renderer/user_script_slave.cc View 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Matt Perry
I just looked at breakpad_win.cc http://codereview.chromium.org/457028/diff/1002/2012 File chrome/app/breakpad_win.cc (right): http://codereview.chromium.org/457028/diff/1002/2012#newcode79 chrome/app/breakpad_win.cc:79: static std::vector<google_breakpad::CustomInfoEntry> entries; maybe ...
11 years ago (2009-12-02 00:17:05 UTC) #1
Aaron Boodman
Good idea, did that.
11 years ago (2009-12-02 00:56:50 UTC) #2
Erik does not do reviews
11 years ago (2009-12-02 00:59:07 UTC) #3
agree with mpcomplete that we should heap allocate the vector rather than using
a static.

http://codereview.chromium.org/457028/diff/1002/2012
File chrome/app/breakpad_win.cc (right):

http://codereview.chromium.org/457028/diff/1002/2012#newcode253
chrome/app/breakpad_win.cc:253: DCHECK(index < kMaxReportedActiveExtensions);
this seems like it should be a CHECK or at least an early return since it would
lead to a memory smash in the wild

Powered by Google App Engine
This is Rietveld 408576698