Fix a couple of bugs where we generate incorrect minidump files on Linux.o
Patch by Markus Gutschke <markus@chromium.org>. R=thestig Review URL: http://breakpad.appspot.com/150001 Review URL: http://breakpad.appspot.com/155001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@649 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -148,6 +148,24 @@ class wasteful_vector {
|
||||
return used_;
|
||||
}
|
||||
|
||||
void resize(unsigned sz, T c = T()) {
|
||||
// No need to test "sz >= 0", as "sz" is unsigned.
|
||||
if (sz <= used_) {
|
||||
used_ = sz;
|
||||
} else {
|
||||
unsigned a = allocated_;
|
||||
if (sz > a) {
|
||||
while (sz > a) {
|
||||
a *= 2;
|
||||
}
|
||||
Realloc(a);
|
||||
}
|
||||
while (sz > used_) {
|
||||
a_[used_++] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T& operator[](size_t index) {
|
||||
return a_[index];
|
||||
}
|
||||
|
Reference in New Issue
Block a user