Bug 1245153 - Wrap errors before they are passed through the IPC channel; r=automatedtester

error.wrap acts as a no-op if it is passed a prototype which is already
of the WebDriverError prototypal chain.

MozReview-Commit-ID: Gd9kUEvsgNv

--HG--
extra : commitid : HObqpKV7a9s
extra : rebase_source : c96b3c1a00a68a56d69d253945de5607039e3b49
extra : source : d75ad1397656e43d22d0d69211df9fce3a667f0d
extra : histedit_source : a6e620e3e4b6bfa4e1d77df48eaab59ffbc3cdce
This commit is contained in:
Andreas Tolfsen 2016-02-03 18:44:55 +00:00
Родитель 1600a0b310
Коммит 55410ee72a
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -171,7 +171,8 @@ proxy.AsyncMessageChannel = class {
if (typeof obj == "undefined") {
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Ok);
} else if (error.isError(obj)) {
let serr = error.toJson(obj);
let err = error.wrap(obj);
let serr = error.toJson(err);
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Error, serr);
} else {
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Value, obj);