Bug 1215502: Send wrapped WebDriverError to client r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 07 Jan 2016 14:41:11 +0000
changeset 279046 a9da976060a8177a2c267935e3245574bb4b479a
parent 279045 26a9634f6ec251c2e3e2688c1d885e6ee7f8815a
child 279047 57af526c36540febcc4abd173e84468ed3050ed2
push id29867
push usercbook@mozilla.com
push dateFri, 08 Jan 2016 11:00:43 +0000
treeherdermozilla-central@1424cdfc075d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1215502
milestone46.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
Bug 1215502: Send wrapped WebDriverError to client r=automatedtester This fixes serialisation of XPCOM exceptions to the client. Response.sendError was incorrectly serialising the err input variable instead of the wrapped WebDriverError, we. r=dburns
testing/marionette/message.js
--- a/testing/marionette/message.js
+++ b/testing/marionette/message.js
@@ -252,17 +252,17 @@ this.Response = class {
    * @throws {Error}
    *     If the {@code error} is not a WebDriverError, the error is
    *     propagated.
    */
   sendError(err) {
     let wd = error.isWebDriverError(err);
     let we = wd ? err : new WebDriverError(err.message);
 
-    this.error = error.toJson(err);
+    this.error = error.toJson(we);
     this.body = null;
     this.send();
 
     // propagate errors that are implementation problems
     if (!wd) {
       throw err;
     }
   }