[Pkg-mozext-commits] [firebug] 26/35: Code styling improvements

David Prévot taffit at moszumanska.debian.org
Sat May 24 14:54:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit b2fb7ff6be2320bcbd35213878fdf6ef736b001f
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Fri May 23 07:46:55 2014 +0200

    Code styling improvements
---
 .../firebug/debugger/breakpoints/breakpointTool.js | 75 +++++++++++-----------
 1 file changed, 39 insertions(+), 36 deletions(-)

diff --git a/extension/content/firebug/debugger/breakpoints/breakpointTool.js b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
index d63f09e..807c49f 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpointTool.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
@@ -730,45 +730,48 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
  * Set the condition of this breakpoint.
  * xxxHonza: cloned from dbg-client.jsm and modifed [Fx32].
  */
-function setCondition(context, bpClient, aCondition)
+function setCondition(context, bpClient, condition)
 {
-    let threadClient = context.activeThread;
-    let root = bpClient._client.mainRoot;
-    let deferred = context.defer();
-
-    if (root.traits.conditionalBreakpoints) {
-      let info = {
-        url: bpClient.location.url,
-        line: bpClient.location.line,
-        column: bpClient.location.column,
-        condition: aCondition
-      };
-
-      // Remove the current breakpoint and add a new one with the
-      // condition.
-      bpClient.remove(aResponse => {
-        if (aResponse && aResponse.error) {
-          deferred.reject(aResponse);
-          return;
-        }
+    var threadClient = context.activeThread;
+    var root = bpClient._client.mainRoot;
+    var deferred = context.defer();
+
+    if (root.traits.conditionalBreakpoints)
+    {
+        var info = {
+            url: bpClient.location.url,
+            line: bpClient.location.line,
+            column: bpClient.location.column,
+            condition: condition
+        };
+
+        // Remove the current breakpoint and add a new one with the condition.
+        bpClient.remove((response) =>
+        {
+            if (response && response.error)
+            {
+                deferred.reject(response);
+                return;
+            }
 
-        threadClient.setBreakpoint(info, (aResponse, aNewBreakpoint) => {
-          if (aResponse && aResponse.error) {
-            deferred.reject(aResponse);
-          } else {
-            deferred.resolve(aNewBreakpoint);
-          }
+            threadClient.setBreakpoint(info, (response, newBreakpoint) =>
+            {
+                if (response && response.error)
+                    deferred.reject(response);
+                else
+                    deferred.resolve(newBreakpoint);
+            });
         });
-      });
-    } else {
-      // The property shouldn't even exist if the condition is blank
-      if(aCondition === "") {
-        delete bpClient.conditionalExpression;
-      }
-      else {
-        bpClient.conditionalExpression = aCondition;
-      }
-      deferred.resolve(bpClient);
+    }
+    else
+    {
+        // The property shouldn't even exist if the condition is blank
+        if (condition === "")
+            delete bpClient.conditionalExpression;
+        else
+            bpClient.conditionalExpression = condition;
+
+        deferred.resolve(bpClient);
     }
 
     return deferred.promise;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list