Bug 1106913 - Send errors from sendResponse/sendError back to chrome. r=whimboo

Errors that arise from inside sendResponse or sendError are currently
only logged to stdout.  Now that we have a pretty safe error.wrap
implementation we should serialise them and return them to the main
process so that they are not "lost" in stdout.

MozReview-Commit-ID: FuMeUqQ7CMv

--HG--
extra : rebase_source : 2d43eb63ec13dbfb461d72dd9ddee232ff4ff9d8
This commit is contained in:
Andreas Tolfsen 2017-11-24 18:19:18 +00:00
Родитель e5e82c8496
Коммит 0cde42dcd0
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -27,7 +27,6 @@ const {
} = Cu.import("chrome://marionette/content/element.js", {});
const {
ElementNotInteractableError,
error,
InsecureCertificateError,
InvalidArgumentError,
InvalidElementStateError,
@ -490,7 +489,7 @@ function dispatch(fn) {
});
req.then(rv => sendResponse(rv, id), err => sendError(err, id))
.catch(error.report);
.catch(err => sendError(err, id));
};
}