-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
delete globalThis.closed
panics REPL
#23422
Comments
@hyp3rflow I will try to investigate in this bug and find out the root cause. |
@bartlomieju I have a question regarding the fix for this bug. Should the fix prevent deleting properties such as |
@MujahedSafaa the ideal fix would involve "capturing" any variables we reference from the global scope either using Chrome Devtools Protocol or by storing |
@bartlomieju Could you please give me more details or any code hints that might be helpful? |
@MujahedSafaa take a look in Let me know if that's enough info to get you started. |
Thanks, @bartlomieju, for the explanation; it was really helpful. I added globalThis.closed to the REPL_INTERNALS_NAME object and replaced the call from self.evaluate_expression("(this.closed)") with a call from the REPL_INTERNALS_NAME object, as you suggested. However, I have a question regarding the REPL_INTERNALS_NAME.closed value. I think the value is only evaluated once when the REPL_INTERNALS_NAME object is initialized in the initialize function with repl_session.evaluate_expression(&get_prelude()).await?;. This means that if this.closed changes later, it will not be reflected in the REPL_INTERNALS_NAME.closed value since it is just evaluated once. So this could cause incorrect behavior right? |
@MujahedSafaa have you tried running |
@bartlomieju Yes, I tried it, and the issue is resolved. It didn't cause any panic. I have no concerns now, so I will open a pull request for the bug. |
The text was updated successfully, but these errors were encountered: