Small perf improvement to bug 755346 - Global variables are not displayed in the debugger frontend, part2; r=vporof
authorPanos Astithas <past@mozilla.com>
Tue, 29 May 2012 14:22:18 +0300
changeset 95318 a55eca18fd52dd3e51b3169ded7ae3a09e30d9ea
parent 95317 59954c646e78bace1bdd25ca16784a63a42f5698
child 95319 4a2d77b56a1970b29f7e11b528a7cba8acba6be8
push id10062
push usereakhgari@mozilla.com
push dateThu, 31 May 2012 02:43:36 +0000
treeherdermozilla-inbound@7edd4b899696 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs755346
milestone15.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
Small perf improvement to bug 755346 - Global variables are not displayed in the debugger frontend, part2; r=vporof
browser/devtools/debugger/debugger-view.js
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -1694,19 +1694,23 @@ PropertiesView.prototype = {
   /**
    * Briefly flash the variables that changed between pauses.
    */
   commitHierarchy: function DVS_commitHierarchy() {
     for (let i in this._currHierarchy) {
       let currScope = this._currHierarchy[i];
       let prevScope = this._prevHierarchy[i];
 
+      if (!prevScope) {
+        continue;
+      }
+
       for (let v in currScope.children) {
         let currVar = currScope.children[v];
-        let prevVar = prevScope && prevScope.children[v];
+        let prevVar = prevScope.children[v];
 
         let action = "";
 
         if (prevVar) {
           let prevValue = prevVar.valueLabel.getAttribute("value");
           let currValue = currVar.valueLabel.getAttribute("value");
 
           if (currValue != prevValue) {