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 network delegate race condition #12044

Merged
merged 3 commits into from Feb 26, 2018

Conversation

Projects
None yet
4 participants
@zcbenz
Contributor

zcbenz commented Feb 26, 2018

This fix the race condition when getting network delegate in UI thread, should be able to close #12029.

The network delegate is created in IO thread lazily, we should never try to get it in UI thread.

@zcbenz zcbenz requested a review from electron/reviewers as a code owner Feb 26, 2018

@deepak1556

👍

@codebytere codebytere merged commit 53229e3 into master Feb 26, 2018

10 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/jenkins/pr-head This commit looks good
Details

@codebytere codebytere deleted the fix-network-delegate-race-condition branch Feb 26, 2018

@ckerr ckerr restored the fix-network-delegate-race-condition branch Feb 26, 2018

@ckerr

This comment has been minimized.

Member

ckerr commented Feb 26, 2018

This is fixed in master for 3.0 but since 2.0.0 will come from the 2-0-x branch, this is still unfixed for 2.0.0

@codebytere codebytere deleted the fix-network-delegate-race-condition branch Feb 26, 2018

sethlu added a commit to sethlu/electron that referenced this pull request May 3, 2018

Fix network delegate race condition (electron#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment