Bug 1331173 - Increase header segment capacity for TaskTracer. r=billm

--HG--
extra : rebase_source : 3cc829ac53c520896d3f28ddf4a8e27a6eac6fc1
This commit is contained in:
Thinker K.F. Li 2017-03-10 02:35:00 +01:00
parent 845499b928
commit 48e9a43dc4
2 changed files with 8 additions and 0 deletions

View File

@ -24,7 +24,14 @@
static_assert(MOZ_ALIGNOF(Pickle::memberAlignmentType) >= MOZ_ALIGNOF(uint32_t),
"Insufficient alignment");
#ifndef MOZ_TASK_TRACER
static const uint32_t kHeaderSegmentCapacity = 64;
#else
// TaskTracer would add extra fields to the header to carry task ID and
// other information.
// \see class Message::HeaderTaskTracer
static const uint32_t kHeaderSegmentCapacity = 128;
#endif
static const uint32_t kDefaultSegmentCapacity = 4096;

View File

@ -316,6 +316,7 @@ private:
void* AllocateSegment(size_t aSize, size_t aCapacity)
{
MOZ_RELEASE_ASSERT(mOwning);
MOZ_ASSERT(aSize <= aCapacity);
char* data = this->template pod_malloc<char>(aCapacity);
if (!data) {