Bug 950246 - Correct nsDOMWindowUtils::StopFrameTimeRecording() alloc to sizeof(float). r=jdm
authorPeiyong Lin <pylaurent1314@gmail.com>
Tue, 21 Jan 2014 15:51:18 -0500
changeset 164514 d97fcd278cd27f0d5f0f318c20dbc0895bc0605e
parent 164513 9d3a377434b656d225d0f27fb8df69229bf8ec39
child 164515 bc98b7a52884e1df484369bc6c3e6360879d70a9
push id26048
push userkwierso@gmail.com
push dateWed, 22 Jan 2014 01:11:21 +0000
treeherdermozilla-central@92cb91891880 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs950246
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950246 - Correct nsDOMWindowUtils::StopFrameTimeRecording() alloc to sizeof(float). r=jdm
dom/base/nsDOMWindowUtils.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2397,17 +2397,17 @@ nsDOMWindowUtils::StopFrameTimeRecording
   LayerManager *mgr = widget->GetLayerManager();
   if (!mgr)
     return NS_ERROR_FAILURE;
 
   nsTArray<float> tmpFrameIntervals;
   mgr->StopFrameTimeRecording(startIndex, tmpFrameIntervals);
   *frameCount = tmpFrameIntervals.Length();
 
-  *frameIntervals = (float*)nsMemory::Alloc(*frameCount * sizeof(float*));
+  *frameIntervals = (float*)nsMemory::Alloc(*frameCount * sizeof(float));
 
   /* copy over the frame intervals and paint times into the arrays we just allocated */
   for (uint32_t i = 0; i < *frameCount; i++) {
     (*frameIntervals)[i] = tmpFrameIntervals[i];
   }
 
   return NS_OK;
 }