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

Issue 2644873002: [Sensors] Fix reading updates after page refresh (Closed)

Created:
3 years, 11 months ago by Mikhail
Modified:
3 years, 10 months ago
CC:
chromium-reviews, blink-reviews, wanming.lin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sensors] Fix reading updates after page refresh This patch fixes reading updates after page refresh. The route cause of the problem was that the outdated document instance was cached in SensorProxy. BUG=679243 BUG=606766 Review-Url: https://codereview.chromium.org/2644873002 Cr-Commit-Position: refs/heads/master@{#446658} Committed: https://chromium.googlesource.com/chromium/src/+/c78e848fc18f203167cb53aedc0e3736bce149b1

Patch Set 1 #

Total comments: 9

Patch Set 2 : Review comments #

Total comments: 1

Patch Set 3 : reset document after it gets detached #

Total comments: 4

Patch Set 4 : comments from haraken@ #

Total comments: 2

Patch Set 5 : Comments from haraken@. Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -14 lines) Patch
M third_party/WebKit/Source/modules/sensor/Sensor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h View 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.h View 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.cpp View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download

Messages

Total messages: 50 (32 generated)
Mikhail
PTAL
3 years, 11 months ago (2017-01-19 13:13:56 UTC) #10
haraken
https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode37 third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp:37: m_hasPendingAnimationFrameTask = false; Would you help me understand why ...
3 years, 11 months ago (2017-01-19 13:57:28 UTC) #11
shalamov
https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode73 third_party/WebKit/Source/modules/sensor/Sensor.cpp:73: initSensorProxyIfNeeded(); Should we pass / use execution context of ...
3 years, 11 months ago (2017-01-20 09:25:33 UTC) #14
Mikhail
PTAL https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/2644873002/diff/20001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode73 third_party/WebKit/Source/modules/sensor/Sensor.cpp:73: initSensorProxyIfNeeded(); On 2017/01/20 09:25:32, shalamov wrote: > Should ...
3 years, 11 months ago (2017-01-24 12:00:18 UTC) #22
shalamov
lgtm I have not more comments, but would be nice to get haraken@ opinion about ...
3 years, 11 months ago (2017-01-24 12:05:45 UTC) #23
Reilly Grant (use Gerrit)
lgtm
3 years, 11 months ago (2017-01-24 19:49:52 UTC) #26
haraken
https://codereview.chromium.org/2644873002/diff/60001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): https://codereview.chromium.org/2644873002/diff/60001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode20 third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp:20: if (m_document != m_sensorProxy->document()) { This condition doesn't look ...
3 years, 11 months ago (2017-01-24 21:19:14 UTC) #27
Mikhail
On 2017/01/24 21:19:14, haraken wrote: > https://codereview.chromium.org/2644873002/diff/60001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp > File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): > > https://codereview.chromium.org/2644873002/diff/60001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode20 > ...
3 years, 11 months ago (2017-01-25 10:50:40 UTC) #28
haraken
On 2017/01/25 10:50:40, Mikhail wrote: > On 2017/01/24 21:19:14, haraken wrote: > > > https://codereview.chromium.org/2644873002/diff/60001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp ...
3 years, 11 months ago (2017-01-25 11:01:30 UTC) #29
Mikhail
On 2017/01/25 11:01:30, haraken wrote: > When does 'm_document != m_sensorProxy->document()' start returning true? when ...
3 years, 11 months ago (2017-01-25 15:22:49 UTC) #30
haraken
https://codereview.chromium.org/2644873002/diff/80001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): https://codereview.chromium.org/2644873002/diff/80001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode20 third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp:20: if (!m_document || m_document->isDetached()) { Will the following work? ...
3 years, 11 months ago (2017-01-25 18:20:06 UTC) #31
Mikhail
Thanks for your comments! https://codereview.chromium.org/2644873002/diff/80001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): https://codereview.chromium.org/2644873002/diff/80001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode20 third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp:20: if (!m_document || m_document->isDetached()) { ...
3 years, 11 months ago (2017-01-26 06:19:59 UTC) #32
haraken
LGTM https://codereview.chromium.org/2644873002/diff/100001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): https://codereview.chromium.org/2644873002/diff/100001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp#newcode36 third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp:36: m_document->enqueueAnimationFrameTask(std::move(callback)); A final question: Why do you need ...
3 years, 11 months ago (2017-01-26 22:24:14 UTC) #33
Mikhail
On 2017/01/26 22:24:14, haraken wrote: > LGTM > > https://codereview.chromium.org/2644873002/diff/100001/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp > File third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp (right): > ...
3 years, 11 months ago (2017-01-27 11:08:04 UTC) #34
haraken
LGTM. I still think it would be tidier to: - Make SensorProxy inherit from ContextLifecycleObserver ...
3 years, 10 months ago (2017-01-27 11:30:33 UTC) #39
Mikhail
On 2017/01/27 11:30:33, haraken wrote: > LGTM. > > I still think it would be ...
3 years, 10 months ago (2017-01-27 11:58:13 UTC) #42
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/2644873002/120001
3 years, 10 months ago (2017-01-27 13:27:18 UTC) #47
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 13:31:41 UTC) #50
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/c78e848fc18f203167cb53aedc0e...

Powered by Google App Engine
This is Rietveld 408576698