Skip to content

Fix iframe crash in SandboxedMarkdown with requestAnimationFrame - #20761

Merged
tidy-dev merged 1 commit into
developmentfrom
fix-markdown-sandbox-crash
Jul 14, 2025
Merged

tidy-dev merged 1 commit into
developmentfrom
fix-markdown-sandbox-crash

Conversation

@sergiou87

Copy link
Copy Markdown
Member

Closes #20760

Description

Wraps iframe src assignment in requestAnimationFrame to prevent a crash in Electron 34 caused by layout changes during ResizeObserver callbacks. Addresses issue #20760.

Release notes

Notes: [Fixed] Fix crash opening Pull Request-related notifications

Wraps iframe src assignment in requestAnimationFrame to prevent a crash in Electron 34 caused by layout changes during ResizeObserver callbacks. Addresses issue #20760.
@tidy-dev
tidy-dev merged commit 7f3bcbe into development Jul 14, 2025
@tidy-dev
tidy-dev deleted the fix-markdown-sandbox-crash branch July 14, 2025 15:03
@raselqabd

Copy link
Copy Markdown

This pull request addresses a critical issue with the SandboxedMarkdown component to prevent crashes caused by layout changes during a ResizeObserver callback in Electron 34. The fix involves wrapping specific operations in a requestAnimationFrame to ensure safe execution.

Fix for Electron 34 crash:

@raselqabd

Copy link
Copy Markdown

ok

@khaldalnwm330-prog

Copy link
Copy Markdown

مساعده

@olaoluwathjoseph-bit

Copy link
Copy Markdown

OPay

@fayzal90 fayzal90 mentioned this pull request Aug 4, 2025
@css503

css503 commented Aug 8, 2025

Copy link
Copy Markdown

I am currently using the latest version of the Windows version, 3.5.2, but it's very, very slow. It's so slow that it freezes. Whenever I open this program, it starts to freeze, and I can't perform any other operations. What's going on?

@noelportillo noelportillo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Okay but I think it's time to go

@@ -360,16 +360,21 @@ export class SandboxedMarkdown extends React.PureComponent<
// convert non-latin strings that existed in the markedjs.
const b64src = Buffer.from(src, 'utf8').toString('base64')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

361

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@@ -360,16 +360,21 @@ export class SandboxedMarkdown extends React.PureComponent<
// convert non-latin strings that existed in the markedjs.
const b64src = Buffer.from(src, 'utf8').toString('base64')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@dcano7843 dcano7843 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@khaldalnwm330-prog

Copy link
Copy Markdown

مساعده

@wadzrahva-collab wadzrahva-collab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@A223456789010304050

Copy link
Copy Markdown

Closes #20760

Description

Wraps iframe src assignment in requestAnimationFrame to prevent a crash in Electron 34 caused by layout changes during ResizeObserver callbacks. Addresses issue #20760.

Release notes

Notes: [Fixed] Fix crash opening Pull Request-related notifications

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.

[Unknown] crash when opening notifications