From 3b85bf9c1fda4bddf14a378bd16184b742e0d815 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 11 Mar 2020 13:37:31 -0700 Subject: [PATCH] browser(firefox): handle message manager `error` event without error (#1344) Type TypeError that happens while loading document is reported in the message manager but does not have the error event. Saw this while reproducing #1307 --- browser_patches/firefox/BUILD_NUMBER | 2 +- browser_patches/firefox/patches/bootstrap.diff | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBER index 6aaa2493d2b79..e3c00fddd3607 100644 --- a/browser_patches/firefox/BUILD_NUMBER +++ b/browser_patches/firefox/BUILD_NUMBER @@ -1 +1 @@ -1041 +1042 diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff index 7a805f46a26c6..c113fae8c43e8 100644 --- a/browser_patches/firefox/patches/bootstrap.diff +++ b/browser_patches/firefox/patches/bootstrap.diff @@ -2458,7 +2458,7 @@ index 0000000000000000000000000000000000000000..be70ea364f9534bb3b344f64970366c3 + diff --git a/juggler/content/PageAgent.js b/juggler/content/PageAgent.js new file mode 100644 -index 0000000000000000000000000000000000000000..05c814d2b6a3df8d770acba723051eb52063bd4f +index 0000000000000000000000000000000000000000..3cafc06be2262a79e8459eb9afc03d424bc01303 --- /dev/null +++ b/juggler/content/PageAgent.js @@ -0,0 +1,919 @@ @@ -2821,7 +2821,7 @@ index 0000000000000000000000000000000000000000..05c814d2b6a3df8d770acba723051eb5 + this._browserPage.emit('pageUncaughtError', { + frameId: frame.id(), + message: errorEvent.message, -+ stack: errorEvent.error.stack ++ stack: errorEvent.error ? errorEvent.error.stack : '', + }); + } +