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: do not reset process_id in URLLoaderFactoryParams #25139

Merged
merged 1 commit into from Aug 28, 2020
Merged

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Aug 26, 2020

Description of Change

Fix #24991.

In OverrideURLLoaderFactoryParams when disabling CORB, the process_id parameter was also changed.

This would cause a DCHECK assertion under certain cases (see #24991 (comment)), and under Release build while the DHCECK assertion would be disabled, it would cause weird permission errors due to wrong process id being set (see #24991 (comment)).

This behavior was introduced by 6d3e6ab from #19488, according to its description, the purpose was to disable CORB when web security is disabled. The original change did need to set the process_id because it was constructing a new Param struct, but after later Chromium upgrades there was no longer need to set process_id because the method was changed to override the parameters instead of creating a new one.

Checklist

Release Notes

Notes: Fix network permission error when there are multiple WebContents sharing same session are created with web security disabled.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 26, 2020
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

Nice find!

@deepak1556
Copy link
Member

Fix network permission error when there are multiple WebContents created with web security disabled.

maybe reword to highlight same session since the comparison was done based on browser_context.

Fix network permission error when there are multiple WebContents sharing same session are created with web security disabled.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 27, 2020
@zcbenz zcbenz merged commit 8f727b3 into master Aug 28, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 28, 2020

Release Notes Persisted

Fix network permission error when there are multiple WebContents sharing same session are created with web security disabled.

@zcbenz zcbenz deleted the process_id_crash branch August 28, 2020 01:43
@trop
Copy link
Contributor

trop bot commented Aug 28, 2020

I have automatically backported this PR to "10-x-y", please check out #25178

@trop
Copy link
Contributor

trop bot commented Aug 28, 2020

I was unable to backport this PR to "8-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Aug 28, 2020

I have automatically backported this PR to "9-x-y", please check out #25179

@trop
Copy link
Contributor

trop bot commented Aug 28, 2020

I have automatically backported this PR to "11-x-y", please check out #25180

@trop
Copy link
Contributor

trop bot commented Aug 28, 2020

@zcbenz has manually backported this PR to "8-x-y", please check out #25181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two BrowserView loadUrl (or loadFile) without await will cause upload file error in renderer process
3 participants