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

Fix crashing after opening a uri on browser #17524

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

hez2010
Copy link
Contributor

@hez2010 hez2010 commented Nov 15, 2024

What does the pull request do?

Return the boolean result directly instead an window JSObject in WindowOpen, otherwise some properties of the JSObject may be accessed while the object being collected by the GC, and failed due to a security error, which will terminate the whole process:

Uncaught SecurityError: Failed to read a named property from 'Window': Blocked a frame with origin "http://..." from accessing a cross-origin frame.

This is also more performant as we no longer need to marshal the JSObject.

What is the current behavior?

The whole process crash after opening a uri and the returned JSObject being collected by the GC.

What is the updated/expected behavior with this PR?

No longer crash.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053368-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added bug os-browser backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Nov 16, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053370-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul merged commit 9091d66 into AvaloniaUI:master Nov 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch bug os-browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants