Bug 846876 - Use this.panel._runningUid instead of this._runningUid. r=dcamp a=bajaj
authorAnton Kovalyov <anton@mozilla.com>
Fri, 29 Mar 2013 15:38:34 -0700
changeset 132517 66301943ef8401dc2ed7453a9833530e645feb9c
parent 132516 974d7b407fd21af55fd250e4ddcc1aa5f8d9e418
child 132518 c4237eb085c3e74fe41b837c84df46623697c857
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp, bajaj
bugs846876
milestone21.0a2
Bug 846876 - Use this.panel._runningUid instead of this._runningUid. r=dcamp a=bajaj
browser/devtools/profiler/ProfilerPanel.jsm
browser/devtools/profiler/test/browser_profiler_bug_830664_multiple_profiles.js
--- a/browser/devtools/profiler/ProfilerPanel.jsm
+++ b/browser/devtools/profiler/ProfilerPanel.jsm
@@ -68,18 +68,18 @@ function ProfileUI(uid, panel) {
       return;
     }
 
     let label = doc.querySelector("li#profile-" + this.uid + " > h1");
     switch (event.data.status) {
       case "loaded":
         if (this.panel._runningUid !== null) {
           this.iframe.contentWindow.postMessage(JSON.stringify({
-            uid: this._runningUid,
-            isCurrent: this._runningUid === uid,
+            uid: this.panel._runningUid,
+            isCurrent: this.panel._runningUid === uid,
             task: "onStarted"
           }), "*");
         }
 
         this.isReady = true;
         this.emit("ready");
         break;
       case "start":
--- a/browser/devtools/profiler/test/browser_profiler_bug_830664_multiple_profiles.js
+++ b/browser/devtools/profiler/test/browser_profiler_bug_830664_multiple_profiles.js
@@ -53,16 +53,19 @@ function stopProfiling() {
 
   ok(msg.textContent.match("Profile 1") !== null, "Message is visible");
   ok(btn.hasAttribute("disabled"), "Button is disabled");
 
   is(gPanel.document.querySelector("li#profile-1 > h1").textContent,
     "Profile 1 *", "Profile 1 has a star next to it.");
   is(gPanel.document.querySelector("li#profile-2 > h1").textContent,
     "Profile 2", "Profile 2 doesn't have a star next to it.");
+  is(doc.querySelector("#profilerMessage").textContent,
+    "Profiler is already running. If you want to run this profile stop Profile 1 first.",
+    "Message is correct.");
 
   gPanel.profiles.get(gUid).once("enabled", confirmAndFinish);
   sendFromActiveProfile("stop");
 }
 
 function confirmAndFinish() {
   let [win, doc] = getProfileInternals(gUid);
   let [btn, msg] = getCleoControls(doc);