Skip to content

fix(computer-use): guard webContents before checking isDestroyed on tab stop - #6483

Open
sentry[bot] wants to merge 1 commit into
devfrom
seer/fix/computer-use-tab-stop-destroyed-guard
Open

sentry[bot] wants to merge 1 commit into
devfrom
seer/fix/computer-use-tab-stop-destroyed-guard

Conversation

@sentry

@sentry sentry Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

What is this about?

This fixes a crash in the computer-use browser task when a browser tab is closed.

What problem does it solve?

When a tab's destroyed event fires, for example from CDP Target.closeTarget or a page-initiated close, Electron's view.webContents returns undefined. The resulting code path throws a fatal TypeError.

What was the situation before?

The destroyed event triggers closeBrowserTab -> taskHost.invalidate -> stopControl -> controller.abort(). That synchronously invokes the abort signal's stop listener. Line 829 called tab.view.webContents.isDestroyed() without checking whether tab.view.webContents was undefined.

How is this implemented?

  • packages/computer-use/browser-task.mjs:829: adds a null check for tab.view.webContents before calling .isDestroyed() in the abort signal stop handler.
  • packages/computer-use/browser-task.mjs:636: adds the same null check before calling .isDestroyed() in the tab-pause loop.

What else changed?

none

Release note

none

Fixes DESKTOP-APP-5T

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry at no cost. You can adjust this setting at any time.

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Skipped Skipped Oct 25, 2026 11:04pm UTC
openwork-den Skipped Skipped Oct 25, 2026 11:04pm UTC
openwork-diagnostics Skipped Skipped Oct 25, 2026 11:04pm UTC
openwork-landing Skipped Skipped v0 Oct 25, 2026 11:04pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – openwork-landing October 25, 2026 23:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den October 25, 2026 23:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics October 25, 2026 23:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-app October 25, 2026 23:04 Inactive
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

OpenWork evidence

Status Commit Preview Updated
🟡 Updating evidence d0071c0 View run 2026-10-25 23:05:43 UTC

A preview for this commit is being prepared.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden clearance. Complete security and confidentiality review of d0071c0241875aa4de394b00af8a016446ac007a found no high or medium security findings and no confidentiality findings. Any new push dismisses this approval. Analysis run

@diff-warden

diff-warden Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Warden: approved

No high or medium security findings and no confidentiality findings.

Reviewed d0071c024187 · Warden run · Updates after every Warden run.

This branch is waiting to be deployed

4 inactive and 1 waiting deployments
Preview – openwork-app — d0071c02 Deployed Oct 25, 2026 by vercel[bot]
Preview – openwork-landing — d0071c02 Deployed Oct 25, 2026 by vercel[bot]
Preview – openwork-den — d0071c02 Deployed Oct 25, 2026 by vercel[bot]
Preview – openwork-diagnostics — d0071c02 Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants