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: prevent bluetooth device list from growing without bound #15805

Merged
merged 2 commits into from Nov 28, 2018

Conversation

Projects
None yet
3 participants
@BinaryMuse
Member

BinaryMuse commented Nov 22, 2018

Description of Change

This PR changes the internal data structure that Electron uses to collect Bluetooth devices from a vector to a map in order to prevent duplicate entries with the same device ID.

This PR also changes the select-bluetooth-device event to only fire if a new device was detected or if an existing device was updated. Internally, BluetoothChooser::AddOrUpdateDevice is called many times, but few of those calls actually update relevant data, especially once several seconds have elapsed.

Finally, I removed atom::BluetoothChooser::RemoveDevice as it's not a member of content::BluetoothChooser and I could find no instance of it being used in the Electron codebase.

Fixes #15603 (see #15603 (comment) for actual issue description)

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines

Release Notes

Notes: fix: prevent bluetooth device list from growing without bound

BinaryMuse added some commits Nov 22, 2018

@BinaryMuse BinaryMuse requested a review from electron/reviewers as a code owner Nov 22, 2018

@BinaryMuse BinaryMuse added the wip label Nov 22, 2018

@bitbloxhub

This comment has been minimized.

bitbloxhub commented Nov 22, 2018

looks good

@codebytere codebytere changed the title from fix: prevent bluetooth device list from growing without bound to fix: prevent bluetooth device list from growing without bound Nov 28, 2018

@codebytere codebytere changed the title from fix: prevent bluetooth device list from growing without bound to fix: prevent bluetooth device list from growing without bound Nov 28, 2018

@codebytere codebytere merged commit 8f04def into master Nov 28, 2018

20 of 21 checks passed

WIP work in progress
Details
Absolute Zero
Semantic Pull Request ready to be squashed
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing-tests Your tests passed on CircleCI!
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

release-clerk bot commented Nov 28, 2018

Release Notes Persisted

fix: prevent bluetooth device list from growing without bound

@codebytere codebytere deleted the mkt/fix-bluetooth-device-list branch Nov 28, 2018

@trop

This comment has been minimized.

Contributor

trop bot commented Nov 28, 2018

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

@trop

This comment has been minimized.

Contributor

trop bot commented Nov 28, 2018

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

@trop

This comment has been minimized.

Contributor

trop bot commented Nov 28, 2018

I have automatically backported this PR to "4-0-x", please check out #15866

@trop trop bot added in-flight/4-0-x and removed target/4-0-x labels Nov 28, 2018

@codebytere

This comment has been minimized.

Member

codebytere commented Nov 28, 2018

@BinaryMuse this is gonna need two manuals, unfort

@trop trop bot added merged/4-0-x and removed in-flight/4-0-x labels Nov 30, 2018

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