Bug 1495261 - Watch for exceptions being thrown while stringifying old exceptions, r=lsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 06 Oct 2018 14:32:37 -1000
changeset 439929 db73000c424ba29b41f6f5438ce6a389b4e529ef
parent 439928 4c10bee140e0e63deeb9bb9ea646dbbb2b7668d6
child 439930 b3158d143d833ec52c938e5235c1f86409fb764b
push id34797
push userdluca@mozilla.com
push dateSun, 07 Oct 2018 21:59:20 +0000
treeherdermozilla-central@b3158d143d83 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsmyth
bugs1495261
milestone64.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 1495261 - Watch for exceptions being thrown while stringifying old exceptions, r=lsmyth.
devtools/server/actors/replay/replay.js
--- a/devtools/server/actors/replay/replay.js
+++ b/devtools/server/actors/replay/replay.js
@@ -702,18 +702,24 @@ const gRequestHandlers = {
 // eslint-disable-next-line no-unused-vars
 function ProcessRequest(request) {
   try {
     if (gRequestHandlers[request.type]) {
       return gRequestHandlers[request.type](request);
     }
     return { exception: "No handler for " + request.type };
   } catch (e) {
-    RecordReplayControl.dump("ReplayDebugger Record/Replay Error: " + e + "\n");
-    return { exception: "" + e };
+    let msg;
+    try {
+      msg = "" + e;
+    } catch (ee) {
+      msg = "Unknown";
+    }
+    RecordReplayControl.dump("ReplayDebugger Record/Replay Error: " + msg + "\n");
+    return { exception: msg };
   }
 }
 
 // eslint-disable-next-line no-unused-vars
 var EXPORTED_SYMBOLS = [
   "EnsurePositionHandler",
   "ClearPositionHandlers",
   "ClearPausedState",