Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jul 5, 2025

filterStackFrame was called with a sourceURL that didn't reflect the original sourceURL. This breaks once you try to use findSourceMapURL on the given sourceURL since the encoding would be off.

Mostly stood out when reading source that the encoding/decoding wasn't consistent. ReactServer always uses encodeURI but devirtualizeURL did not apply decodeUR. ReactReplyClient didn't encode at all. It's important that rsc: URLs have a predictable format so that frameworks can retrieve the original sourceURL reliably.

`filterStackFrame` was called with a sourceURL that didn't reflect the original sourceURL.
This breaks once you try to use `findSourceMapURL` on the given sourceURL since the encoding would be off.
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 5, 2025
@react-sizebot
Copy link

Comparing: 5d87cd2...0f6c76c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.50 kB 530.50 kB = 93.66 kB 93.66 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 655.04 kB 655.04 kB = 115.35 kB 115.35 kB
facebook-www/ReactDOM-prod.classic.js = 675.12 kB 675.12 kB = 118.77 kB 118.77 kB
facebook-www/ReactDOM-prod.modern.js = 665.54 kB 665.54 kB = 117.13 kB 117.13 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 0f6c76c

@eps1lon eps1lon requested a review from sebmarkbage July 5, 2025 15:54
@eps1lon eps1lon marked this pull request as ready for review July 5, 2025 15:54
// and suffix. We don't need the environment name because it's available on the
// parent object that will contain the stack.
const envIdx = url.indexOf('/', 12);
const envIdx = url.indexOf('/', 'rsc://React/'.length);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this get optimized by closure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@eps1lon eps1lon merged commit 4aad5e4 into facebook:main Jul 6, 2025
250 checks passed
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Revisão. TZAHAL 1165. IDF. ISRAEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants