Bug 1539221 - Fix piping of errors back to the client due to missing formatError symbol. r=ato
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 04 Apr 2019 11:16:23 +0000
changeset 467955 2f0524895cf33bbac0547c3d0a2ff494b9ab8008
parent 467954 2c261b95d855b3f61595342fdce6cd64fd1f1cc1
child 467956 d16ffacbce08ded8e18a6500435274d2bffe02c0
push id35813
push useraiakab@mozilla.com
push dateThu, 04 Apr 2019 16:07:30 +0000
treeherdermozilla-central@aa623df2ae8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1539221
milestone68.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 1539221 - Fix piping of errors back to the client due to missing formatError symbol. r=ato Differential Revision: https://phabricator.services.mozilla.com/D25555
remote/sessions/Session.jsm
--- a/remote/sessions/Session.jsm
+++ b/remote/sessions/Session.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["Session"];
 
 const {ParentProcessDomains} = ChromeUtils.import("chrome://remote/content/domains/ParentProcessDomains.jsm");
 const {Domains} = ChromeUtils.import("chrome://remote/content/domains/Domains.jsm");
-const {formatError} = ChromeUtils.import("chrome://remote/content/Error.jsm");
+const {RemoteAgentError} = ChromeUtils.import("chrome://remote/content/Error.jsm");
 
 /**
  * A session represents exactly one client WebSocket connection.
  *
  * Every new WebSocket connections is associated with one session that
  * deals with despatching incoming command requests to the right
  * target, sending back responses, and propagating events originating
  * from domains.
@@ -66,17 +66,17 @@ class Session {
     });
   }
 
   onError(id, error) {
     this.connection.send({
       id,
       sessionId: this.id,
       error: {
-        message: formatError(error, {stack: true}),
+        message: RemoteAgentError.format(error, {stack: true}),
       },
     });
   }
 
   // Domain event listener
 
   onEvent(eventName, params) {
     this.connection.send({