Skip to content

Commit

Permalink
fix: catch uncaught throws from #getHandleFromWindow (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf-2 authored Sep 8, 2023
1 parent ca0d398 commit f41d5cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bidiMapper/domains/script/ChannelProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ export class ChannelProxy {

/** Gets a ChannelProxy from window and returns its handle. */
async startListenerFromWindow(realm: Realm, eventManager: EventManager) {
const channelHandle = await this.#getHandleFromWindow(realm);
void this.#startListener(realm, channelHandle, eventManager);
try {
const channelHandle = await this.#getHandleFromWindow(realm);
void this.#startListener(realm, channelHandle, eventManager);
} catch (error) {
this.#logger?.(LogType.debugError, error);
}
}

/**
Expand Down

0 comments on commit f41d5cf

Please sign in to comment.