Merge fx-team to m-c. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 16 Jun 2015 14:31:13 -0400
changeset 249118 69dab4252c6a77f9b5bdd83bc2fe4a7204761a0e
parent 249114 5d9ffe1fcb5cfa8eeee4c30215aea3f63aff7b42 (current diff)
parent 249117 769314fc5bca72728d6a5efcfcb996fe0485a8a9 (diff)
child 249145 02f2b34ed5e40c7888eb5a0c207bc885f0aa1000
push id61149
push userryanvm@gmail.com
push dateTue, 16 Jun 2015 18:48:55 +0000
treeherdermozilla-inbound@4f381552336d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone41.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
Merge fx-team to m-c. a=merge
--- a/toolkit/devtools/server/actors/webconsole.js
+++ b/toolkit/devtools/server/actors/webconsole.js
@@ -806,28 +806,24 @@ WebConsoleActor.prototype =
     let evalInfo = this.evalWithDebugger(input, evalOptions);
     let evalResult = evalInfo.result;
     let helperResult = evalInfo.helperResult;
 
     let result, errorMessage, errorGrip = null;
     if (evalResult) {
       if ("return" in evalResult) {
         result = evalResult.return;
-      }
-      else if ("yield" in evalResult) {
+      } else if ("yield" in evalResult) {
         result = evalResult.yield;
-      }
-      else if ("throw" in evalResult) {
+      } else if ("throw" in evalResult) {
         let error = evalResult.throw;
         errorGrip = this.createValueGrip(error);
-        let errorToString = evalInfo.window
-                            .evalInGlobalWithBindings("ex + ''", {ex: error});
-        if (errorToString && typeof errorToString.return == "string") {
-          errorMessage = errorToString.return;
-        }
+        errorMessage = error && (typeof error === "object")
+          ? error.unsafeDereference().toString()
+          : "" + error;
       }
     }
 
     // If a value is encountered that the debugger server doesn't support yet,
     // the console should remain functional.
     let resultGrip;
     try {
       resultGrip = this.createValueGrip(result);
--- a/toolkit/devtools/webconsole/test/test_jsterm_queryselector.html
+++ b/toolkit/devtools/webconsole/test/test_jsterm_queryselector.html
@@ -18,17 +18,21 @@ let gState;
 function evaluateJS(input) {
   return new Promise((resolve) => gState.client.evaluateJS(input, resolve));
 }
 
 function startTest() {
   removeEventListener("load", startTest);
   attachConsole([], state => {
     gState = state;
-    let tests = [checkQuerySelectorAll, checkQuerySelectorAllNotExist];
+    let tests = [
+      checkQuerySelectorAll,
+      checkQuerySelectorAllNotExist,
+      checkQuerySelectorAllException
+    ];
     runTests(tests, testEnd);
   }, true);
 }
 
 let checkQuerySelectorAll = Task.async(function*() {
   info ("$$ returns an array");
   let response = yield evaluateJS("$$('body')");
   basicResultCheck(response, "$$('body')", {
@@ -49,16 +53,33 @@ let checkQuerySelectorAllNotExist = Task
     class: "Array",
     preview: {
       length: 0
     }
   });
   nextTest();
 });
 
+let checkQuerySelectorAllException = Task.async(function*() {
+  info ("$$ returns an exception if an invalid selector was provided");
+  let response = yield evaluateJS("$$(':foo')");
+  checkObject(response, {
+    input: "$$(':foo')",
+    exceptionMessage: "SyntaxError: An invalid or illegal string was specified",
+    exception: {
+      preview: {
+        kind: "DOMException",
+        name: "SyntaxError",
+        message: "An invalid or illegal string was specified"
+      }
+    }
+  });
+  nextTest();
+});
+
 function basicResultCheck(response, input, output) {
   checkObject(response, {
     from: gState.actor,
     input: input,
     result: output,
   });
   ok(!response.exception, "no eval exception");
   ok(!response.helperResult, "no helper result");
--- a/toolkit/themes/shared/aboutSupport.css
+++ b/toolkit/themes/shared/aboutSupport.css
@@ -29,22 +29,22 @@ button {
 }
 
 table {
   background-color: var(--aboutSupport-table-background);
   color: var(--in-content-text-color);
   font: message-box;
   text-align: start;
   width: 100%;
-  border: 1px solid var(--in-content-table-border-color);
+  border: 1px solid var(--in-content-border-color);
   border-spacing: 0px;
 }
 
 th, td {
-  border: 1px solid var(--in-content-table-border-color);
+  border: 1px solid var(--in-content-border-color);
   padding: 4px;
 }
 
 thead th {
   text-align: center;
 }
 
 th {
@@ -77,17 +77,17 @@ td {
 .pref-value {
   width: 30%;
   white-space: nowrap;
   overflow: hidden;
 }
 
 #action-box {
   background-color: var(--aboutSupport-table-background);
-  border: 1px solid var(--in-content-table-border-color);
+  border: 1px solid var(--in-content-border-color);
   color: var(--in-content-text-color);
   float: right;
   margin-top: 2em;
   margin-bottom: 20px;
   -moz-margin-start: 20px;
   -moz-margin-end: 0;
   padding: 16px;
   width: 30%;