Bug 812935 - Fix undefined value error in memory reporter for web workers. r=khuey, a=akeybl.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 18 Nov 2012 17:49:13 -0800
changeset 116991 b51e664d7036315be2d29da11160ef85e481c208
parent 116990 13365a46ce7daddf6dff3d87839486cd5c98b814
child 116992 329792016afefc23d1530fd06e9928033d344f89
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, akeybl
bugs812935
milestone18.0a2
Bug 812935 - Fix undefined value error in memory reporter for web workers. r=khuey, a=akeybl.
dom/workers/WorkerPrivate.cpp
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1555,19 +1555,20 @@ public:
     if (!mWorkerPrivate) {
 #ifdef DEBUG
       nsAutoCString message("Unable to report memory for ");
       message += NS_LITERAL_CSTRING("Worker (") + mAddressString +
                  NS_LITERAL_CSTRING(")! It is either using ctypes or is in "
                                     "the process of being destroyed");
       NS_WARNING(message.get());
 #endif
+      *static_cast<int64_t*>(aData) = 0;
       return NS_OK;
     }
-    
+
     if (!mWorkerPrivate->BlockAndCollectRuntimeStats(aIsQuick, aData)) {
       return NS_ERROR_FAILURE;
     }
 
     return NS_OK;
   }
 
   NS_IMETHOD GetName(nsACString &aName)