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

Issue 2476563002: bluetooth: Fix crash when accepting location permission (Closed)

Created:
4 years, 1 month ago by ortuno
Modified:
4 years, 1 month ago
Reviewers:
gone, juncai
CC:
agrieve+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Fix crash when accepting location permission http://crrev.com/2369673003 introduced code to close the chooser when the window looses focus. This works great for when the user switches apps but it sadly causes the chooser to get closed when the permission prompt opens up. Then when the user accepts the permission request chrome crashes because the chooser was closed. Checks if the chooser is still opened before restarting the scan. Changes the testing framework to simulate a focus change when requesting permission and adds asserts to make sure native functions are not being called after the native object has been destroyed. BUG=661770 Committed: https://crrev.com/f7d18c0fc6b044c83e01f169e180835b6c4645da Cr-Commit-Position: refs/heads/master@{#430197}

Patch Set 1 #

Patch Set 2 : git cl try #

Total comments: 2

Patch Set 3 : Address juncai's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -9 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java View 1 2 6 chunks +33 lines, -9 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
ortuno
juncai: PTAL
4 years, 1 month ago (2016-11-03 06:03:25 UTC) #4
juncai
LGTM with nit. https://codereview.chromium.org/2476563002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java (right): https://codereview.chromium.org/2476563002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java#newcode67 chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java:67: assertFalse(mNativeBluetoothChooserDialogPtr == 0); nit: use assertTrue() ...
4 years, 1 month ago (2016-11-04 01:21:53 UTC) #7
ortuno
Thanks! https://codereview.chromium.org/2476563002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java (right): https://codereview.chromium.org/2476563002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java#newcode67 chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java:67: assertFalse(mNativeBluetoothChooserDialogPtr == 0); On 2016/11/04 at 01:21:53, juncai ...
4 years, 1 month ago (2016-11-04 04:06:03 UTC) #10
ortuno
dfalcantara: PTAL
4 years, 1 month ago (2016-11-04 04:07:05 UTC) #12
gone
lgtm
4 years, 1 month ago (2016-11-04 21:02:31 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2476563002/40001
4 years, 1 month ago (2016-11-06 21:56:36 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-06 22:25:47 UTC) #19
commit-bot: I haz the power
4 years, 1 month ago (2016-11-06 22:28:23 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f7d18c0fc6b044c83e01f169e180835b6c4645da
Cr-Commit-Position: refs/heads/master@{#430197}

Powered by Google App Engine
This is Rietveld 408576698