-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fiber] InvokeGuardedCallback without metaprogramming #26569
Conversation
Comparing: fdad813...8e9965d Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
3b02d97
to
5713b4d
Compare
5713b4d
to
9f3a8f7
Compare
}; | ||
} | ||
// We only get here if we are in an environment that either does not support the browser | ||
// variant or we had trouble getting the brwoser to emit the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// variant or we had trouble getting the brwoser to emit the error. | |
// variant or we had trouble getting the browser to emit the error. |
86976ff
to
87f74c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably shouldn't rely on window/document changing anyway. I suspect this won't be the last time we do this. In fact, I'm kind of doing it now in my draft PR.
I feel like it's safe for us to assume that window/document won't change during the life time and it's up to us to rewrite our tests to not rely on it.
The implementation is largely unchanged except that the branching for when to use thebrowser specific override in dev is done in the function execution rather than by replacing the function implementation upon module evaluation.
87f74c6
to
8e9965d
Compare
InvokeGuardedCallback is now implemented with the browser fork done at error-time rather than module-load-time. Originally it also tried to freeze the window/document references to avoid mismatches in prototype chains when testing React in different documents however we have since updated our tests to not do this and it was a test only feature so I removed it.
InvokeGuardedCallback is now implemented with the browser fork done at error-time rather than module-load-time. Originally it also tried to freeze the window/document references to avoid mismatches in prototype chains when testing React in different documents however we have since updated our tests to not do this and it was a test only feature so I removed it.
InvokeGuardedCallback is now implemented with the browser fork done at error-time rather than module-load-time. Originally it also tried to freeze the window/document references to avoid mismatches in prototype chains when testing React in different documents however we have since updated our tests to not do this and it was a test only feature so I removed it. DiffTrain build for commit cc93a85.
InvokeGuardedCallback is now implemented with the browser fork done at error-time rather than module-load-time. Originally it also tried to freeze the window/document references to avoid mismatches in prototype chains when testing React in different documents however we have since updated our tests to not do this and it was a test only feature so I removed it.