summaryrefslogtreecommitdiff
path: root/ext/js/comm
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-23 12:29:54 -0400
committerGitHub <noreply@github.com>2021-05-23 12:29:54 -0400
commit41c0132c59a31c6d8bcc711b94b0859349e88f9b (patch)
treef00e3a56021dc1634f30c79fa3ea71071039e0a6 /ext/js/comm
parentce340d7a19f2d60a952820aac9e7c942f884eb98 (diff)
Improve support for sandboxed iframes (#1704)
* Add more tests * Improve handling of errors from setupFrame * Passively handle errors when contentDocument is null
Diffstat (limited to 'ext/js/comm')
-rw-r--r--ext/js/comm/frame-client.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/js/comm/frame-client.js b/ext/js/comm/frame-client.js
index d15cee30..c74a9913 100644
--- a/ext/js/comm/frame-client.js
+++ b/ext/js/comm/frame-client.js
@@ -156,7 +156,12 @@ class FrameClient {
// Prevent unhandled rejections
frameLoadedPromise.catch(() => {}); // NOP
- setupFrame(frame);
+ try {
+ setupFrame(frame);
+ } catch (e) {
+ cleanup();
+ reject(e);
+ }
});
}