Fix broken inspector tests.
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Sep 2015 00:19:03 +0000 (00:19 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Sep 2015 00:19:03 +0000 (00:19 +0000)
Reviewed by Joseph Pecoraro and Brian Burg.

We can't redeclare a "let" variable and "var" variable using the same
identifier at the top-level of a function.

* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.sendCommand):
(InspectorProtocol.addEventListener):
(InspectorProtocol.dispatchMessageFromBackend):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190191 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test/InspectorProtocol.js

index 72020b0..425f9a9 100644 (file)
@@ -1,5 +1,19 @@
 2015-09-23  Saam barati  <sbarati@apple.com>
 
+        Fix broken inspector tests.
+
+        Reviewed by Joseph Pecoraro and Brian Burg.
+
+        We can't redeclare a "let" variable and "var" variable using the same
+        identifier at the top-level of a function.
+
+        * UserInterface/Test/InspectorProtocol.js:
+        (InspectorProtocol.sendCommand):
+        (InspectorProtocol.addEventListener):
+        (InspectorProtocol.dispatchMessageFromBackend):
+
+2015-09-23  Saam barati  <sbarati@apple.com>
+
         Web Inspector: Don't use bind() when creating internal AST, instead, pass in "this" parameter to map()
         https://bugs.webkit.org/show_bug.cgi?id=149483
 
index 489542c..61f5ae9 100644 (file)
@@ -35,7 +35,7 @@ InspectorProtocol.sendCommand = function(methodOrObject, params, handler)
     // Allow new-style arguments object, as in awaitCommand.
     let method = methodOrObject;
     if (typeof methodOrObject === "object")
-        var {method, params, handler} = methodOrObject;
+        ({method, params, handler} = methodOrObject);
 
     this._dispatchTable[++this._requestId] = handler;
     let messageObject = {method, params, id: this._requestId};
@@ -98,7 +98,7 @@ InspectorProtocol.addEventListener = function(eventTypeOrObject, listener)
 {
     let event = eventTypeOrObject;
     if (typeof eventTypeOrObject === "object")
-        var {event, listener} = eventTypeOrObject;
+        ({event, listener} = eventTypeOrObject);
 
     if (typeof event !== "string")
         throw new Error("Event name must be a string.");
@@ -177,4 +177,4 @@ InspectorProtocol.dispatchMessageFromBackend = function(messageObject)
                 resolve(messageObject.result);
         }
     }
-}
\ No newline at end of file
+}