Skip to content
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

Unintended recursive set of title #12178

Closed
emilhammarstedtst opened this issue Feb 13, 2023 · 3 comments · Fixed by #12221
Closed

Unintended recursive set of title #12178

emilhammarstedtst opened this issue Feb 13, 2023 · 3 comments · Fixed by #12221
Labels
bug bugs found in the application webviews issues related to webviews

Comments

@emilhammarstedtst
Copy link
Contributor

emilhammarstedtst commented Feb 13, 2023

This line creates an unintended infinite recursion when trying to set title of a webview.

should use this._title when comparing and assigning within get/set function

@msujew msujew added bug bugs found in the application webviews issues related to webviews labels Feb 13, 2023
@tsmaeder
Copy link
Contributor

How do you provoke this? If this is indeed recursive, wouldn't the recursion stop at the second iteration because this.title !== value would return false?

@msujew
Copy link
Member

msujew commented Feb 17, 2023

@tsmaeder Since the getter of this.title accesses _title (which never changes) it doesn't stop at the second iteration. It should indeed lead to an infinite recursion.

@tsmaeder
Copy link
Contributor

Ah, thanks. Property methods are a blessing and a curse.

FernandoAscencio added a commit to FernandoAscencio/theia that referenced this issue Feb 24, 2023
This commit closed the issue eclipse-theia#12178.

Signed-off-by: FernandoAscencio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application webviews issues related to webviews
Projects
None yet
3 participants