Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 1898303003: bluetooth: Clean up WebBluetoothServiceImpl when adapter is removed (Closed)

Created:
4 years, 8 months ago by ortuno
Modified:
4 years, 8 months ago
Reviewers:
Jeffrey Yasskin
CC:
chromium-reviews, darin-cc_chromium.org, jam, ortuno+watch_chromium.org, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@my-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Clean up WebBluetoothServiceImpl when adapter is removed There was a use-after-free because the adapter in BluetoothDispatcherHost was destroyed before notify sessions in WebBluetoothServiceImpl were destroyed. This CL calls AdapterPresentChange on the adapter observers to notify that the adapter has been destroyed and that all state should be cleaned. BUG=604318 Committed: https://crrev.com/e2d1eb7c37a9a08934b35e92dcc4b9658a59799c Cr-Commit-Position: refs/heads/master@{#388378}

Patch Set 1 #

Patch Set 2 : Clean up #

Total comments: 2

Patch Set 3 : Re-enable tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -24 lines) Patch
M content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/bluetooth/web_bluetooth_service_impl.h View 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/bluetooth/web_bluetooth_service_impl.cc View 2 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/ASANExpectations View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/LayoutTests/MSANExpectations View 1 2 1 chunk +0 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (4 generated)
ortuno
jyasskin: WDYT?
4 years, 8 months ago (2016-04-19 20:27:14 UTC) #2
Jeffrey Yasskin
Looks great! This fixes the asan/msan problem? https://codereview.chromium.org/1898303003/diff/20001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1898303003/diff/20001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode490 content/browser/bluetooth/bluetooth_dispatcher_host.cc:490: observer->AdapterPresentChanged(nullptr, false); ...
4 years, 8 months ago (2016-04-19 21:08:27 UTC) #3
ortuno
Yup! This way the notify sessions are delete before the adapter is destroyed so we ...
4 years, 8 months ago (2016-04-19 21:36:33 UTC) #4
Jeffrey Yasskin
Update ASANExpectations and MSANExpectations and then LGTM. Thanks!
4 years, 8 months ago (2016-04-19 21:54:20 UTC) #5
ortuno
Done. Thanks!
4 years, 8 months ago (2016-04-19 22:28:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1898303003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1898303003/40001
4 years, 8 months ago (2016-04-19 22:28:48 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-20 00:33:10 UTC) #10
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:18:56 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e2d1eb7c37a9a08934b35e92dcc4b9658a59799c
Cr-Commit-Position: refs/heads/master@{#388378}

Powered by Google App Engine
This is Rietveld 408576698