bug 1523104: remote: format error packets according to puppeteer expectations; r=ato
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 05 Mar 2019 13:14:14 -0800
changeset 521125 f298dfa8a1b1
parent 521124 1244522a15c7
child 521126 2b1bde33c72e
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1523104
milestone67.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 1523104: remote: format error packets according to puppeteer expectations; r=ato
remote/Session.jsm
--- a/remote/Session.jsm
+++ b/remote/Session.jsm
@@ -50,17 +50,17 @@ class Session {
       const [domainName, methodName] = Domains.splitMethod(method);
       if (this.domains.domainSupportsMethod(domainName, methodName)) {
         await this.executeInParent(id, domainName, methodName, params);
       } else {
         this.executeInChild(id, domainName, methodName, params);
       }
     } catch (e) {
       const error = formatError(e, {stack: true});
-      this.connection.send({id, error});
+      this.connection.send({id, error: { message: error }});
     }
   }
 
   async executeInParent(id, domain, method, params) {
     const inst = this.domains.get(domain);
     const result = await inst[method](params);
     this.connection.send({id, result});
   }
@@ -99,17 +99,17 @@ class Session {
       this.connection.send({id, result});
       break;
 
     case "remote:event":
       this.connection.send(event);
       break;
 
     case "remote:error":
-      this.connection.send({id, error: formatError(error, {stack: true})});
+      this.connection.send({id, error: { message: formatError(error, {stack: true}) }});
       break;
     }
   }
 
   toString() {
     return `[object Session ${this.connection.id}]`;
   }
 }