зеркало из https://github.com/mozilla/pjs.git
Bug 387584 - "ASSERTION: should not have buffer of zero size [@nsTArray_base::EnsureCapacity]". Patch by Sergey Yanovich <ynvich@gmail.com>. r+a=bsmedberg.
This commit is contained in:
Родитель
329d459ed6
Коммит
f82dda090a
|
@ -43,7 +43,6 @@
|
||||||
|
|
||||||
nsTArray_base::Header nsTArray_base::sEmptyHdr = { 0, 0, 0 };
|
nsTArray_base::Header nsTArray_base::sEmptyHdr = { 0, 0, 0 };
|
||||||
|
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
|
||||||
nsTArray_base::nsTArray_base()
|
nsTArray_base::nsTArray_base()
|
||||||
: mHdr(&sEmptyHdr) {
|
: mHdr(&sEmptyHdr) {
|
||||||
MOZ_COUNT_CTOR(nsTArray_base);
|
MOZ_COUNT_CTOR(nsTArray_base);
|
||||||
|
@ -52,7 +51,6 @@ nsTArray_base::nsTArray_base()
|
||||||
nsTArray_base::~nsTArray_base() {
|
nsTArray_base::~nsTArray_base() {
|
||||||
MOZ_COUNT_DTOR(nsTArray_base);
|
MOZ_COUNT_DTOR(nsTArray_base);
|
||||||
}
|
}
|
||||||
#endif // NS_BUILD_REFCNT_LOGGING
|
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
nsTArray_base::EnsureCapacity(size_type capacity, size_type elemSize) {
|
nsTArray_base::EnsureCapacity(size_type capacity, size_type elemSize) {
|
||||||
|
|
|
@ -85,14 +85,8 @@ class NS_COM_GLUE nsTArray_base {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifndef NS_BUILD_REFCNT_LOGGING
|
|
||||||
nsTArray_base()
|
|
||||||
: mHdr(&sEmptyHdr) {
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
nsTArray_base();
|
nsTArray_base();
|
||||||
~nsTArray_base();
|
~nsTArray_base();
|
||||||
#endif // NS_BUILD_REFCNT_LOGGING
|
|
||||||
|
|
||||||
// Resize the storage if necessary to achieve the requested capacity.
|
// Resize the storage if necessary to achieve the requested capacity.
|
||||||
// @param capacity The requested number of array elements.
|
// @param capacity The requested number of array elements.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче