|
|
Description[sensors] [win] Fix ambient light not working properly on Windows 10.
The event listener was never called despite SetEventSink returning
success. Debbuging further it turns out that the event listener was
created in the sensor thread, however the listener was not set in
the sensor thread (from StartSensor()), this seems to confuse COM.
BUG=606766
Committed: https://crrev.com/26947f590d1526ea0cf3d485382da6dc1a068ec5
Cr-Commit-Position: refs/heads/master@{#435513}
Patch Set 1 #Patch Set 2 : Fix unit tests #
Total comments: 2
Patch Set 3 : Fix Alex comments #
Total comments: 1
Patch Set 4 : Fix mikhail comments #Patch Set 5 : Fix test failures #
Total comments: 1
Patch Set 6 : Fix typo #
Messages
Total messages: 48 (31 generated)
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
alexis.menard@intel.com changed reviewers: + alexander.shalamov@intel.com, mikhail.pozdnyakov@intel.com
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
Description was changed from ========== [sensors] [win] Fix ambient light not working on Lenovo Miix with Windows 10. The event listener was never called despite SetEventSink returning success. Debbuging further it turns out that the event listener was created in the sensor thread, however the listener was not set in the sensor thread (from StartSensor()), this seems to confuse COM. BUG=606766 ========== to ========== [sensors] [win] Fix ambient light not working properly on Windows 10. The event listener was never called despite SetEventSink returning success. Debbuging further it turns out that the event listener was created in the sensor thread, however the listener was not set in the sensor thread (from StartSensor()), this seems to confuse COM. BUG=606766 ==========
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... File device/generic_sensor/platform_sensor_reader_win.cc (right): https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... device/generic_sensor/platform_sensor_reader_win.cc:287: base::AutoLock autolock(lock_); If it is accessed only on sensor thread, I think you can remove lock. https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... device/generic_sensor/platform_sensor_reader_win.cc:294: sensor_active_ = true; Should this be moved to: if (!sensor_active_) { postTask(); sensor_active_ = true; } then, if (FAILED(...)) { ... sensor_active_ = false; } Otherwise, we can post multiple tasks for ListenSensorEvent()
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/11/15 at 07:31:19, alexander.shalamov wrote: > https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... > File device/generic_sensor/platform_sensor_reader_win.cc (right): > > https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... > device/generic_sensor/platform_sensor_reader_win.cc:287: base::AutoLock autolock(lock_); > If it is accessed only on sensor thread, I think you can remove lock. > > https://codereview.chromium.org/2495073002/diff/20001/device/generic_sensor/p... > device/generic_sensor/platform_sensor_reader_win.cc:294: sensor_active_ = true; > Should this be moved to: > > if (!sensor_active_) { > postTask(); > sensor_active_ = true; > } > > then, > > if (FAILED(...)) { > ... > sensor_active_ = false; This one is not needed StopSensor() takes care of it. > } > > Otherwise, we can post multiple tasks for ListenSensorEvent()
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
alexis.menard@intel.com changed reviewers: + reillyg@chromium.org, timvolodine@chomium.org
https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... File device/generic_sensor/platform_sensor_reader_win.cc (right): https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... device/generic_sensor/platform_sensor_reader_win.cc:288: event_listener_->AddRef(); why is that needed?
On 2016/11/21 at 11:17:40, mikhail.pozdnyakov wrote: > https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... > File device/generic_sensor/platform_sensor_reader_win.cc (right): > > https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... > device/generic_sensor/platform_sensor_reader_win.cc:288: event_listener_->AddRef(); > why is that needed? @alexander : I believe it's not needed, or if so then one would expect a Release in the StopSensor() method.
On 2016/11/22 18:30:34, darktears wrote: > On 2016/11/21 at 11:17:40, mikhail.pozdnyakov wrote: > > > https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... > > File device/generic_sensor/platform_sensor_reader_win.cc (right): > > > > > https://codereview.chromium.org/2495073002/diff/40001/device/generic_sensor/p... > > device/generic_sensor/platform_sensor_reader_win.cc:288: > event_listener_->AddRef(); > > why is that needed? > > @alexander : I believe it's not needed, or if so then one would expect a Release > in the StopSensor() method. Sorry, missed that, SetEventSink should ref passed interface and SetEventSink(null) should unref it. Mikhail is right, the line (288) can be removed.
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
This change makes sense to me but look at the failing test on the win_chromium_x64_rel_ng bot.
On 2016/11/23 at 18:54:05, reillyg wrote: > This change makes sense to me but look at the failing test on the win_chromium_x64_rel_ng bot. Yes I will, I just rebased the patch so I'm going to look.
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/11/29 at 00:22:05, commit-bot wrote: > Dry run: CQ is trying da patch. Follow status at > https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... @reillyg : tests are green, would love to have your final review.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
https://codereview.chromium.org/2495073002/diff/80001/device/generic_sensor/p... File device/generic_sensor/platform_sensor_and_provider_unittest_win.cc (right): https://codereview.chromium.org/2495073002/diff/80001/device/generic_sensor/p... device/generic_sensor/platform_sensor_and_provider_unittest_win.cc:483: EXPECT_TRUE(sensor->StartListening(client.get(), configuration)); StopListening became StartListening here.
The CQ bit was checked by alexis.menard@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/11/29 at 16:06:57, reillyg wrote: > https://codereview.chromium.org/2495073002/diff/80001/device/generic_sensor/p... > File device/generic_sensor/platform_sensor_and_provider_unittest_win.cc (right): > > https://codereview.chromium.org/2495073002/diff/80001/device/generic_sensor/p... > device/generic_sensor/platform_sensor_and_provider_unittest_win.cc:483: EXPECT_TRUE(sensor->StartListening(client.get(), configuration)); > StopListening became StartListening here. oops, sorry about that. Fixed now.
lgtm
The CQ bit was checked by alexis.menard@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from alexander.shalamov@intel.com, mikhail.pozdnyakov@intel.com Link to the patchset: https://codereview.chromium.org/2495073002/#ps100001 (title: "Fix typo")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1480551720432320, "parent_rev": "8f38134a2a4b64371355bed28c7f38c9bf1a9896", "commit_rev": "9c43c2789a6472e9471ffdd59ea3a4e968ab8bbf"}
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== [sensors] [win] Fix ambient light not working properly on Windows 10. The event listener was never called despite SetEventSink returning success. Debbuging further it turns out that the event listener was created in the sensor thread, however the listener was not set in the sensor thread (from StartSensor()), this seems to confuse COM. BUG=606766 ========== to ========== [sensors] [win] Fix ambient light not working properly on Windows 10. The event listener was never called despite SetEventSink returning success. Debbuging further it turns out that the event listener was created in the sensor thread, however the listener was not set in the sensor thread (from StartSensor()), this seems to confuse COM. BUG=606766 Committed: https://crrev.com/26947f590d1526ea0cf3d485382da6dc1a068ec5 Cr-Commit-Position: refs/heads/master@{#435513} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/26947f590d1526ea0cf3d485382da6dc1a068ec5 Cr-Commit-Position: refs/heads/master@{#435513} |