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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp

Issue 2471103002: [sensors] Close mock sensor stubs after test is finished (Closed)
Patch Set: Fix for comment from Mikhail Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
index add04b99327deacdb576b82b73261f851d955c05..d58488fcb71a1b235b7423b48a870e45374b9865 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
@@ -120,13 +120,16 @@ void SensorProxy::SensorReadingChanged() {
}
void SensorProxy::handleSensorError(ExceptionCode code,
- const String& sanitizedMessage,
- const String& unsanitizedMessage) {
+ String sanitizedMessage,
+ String unsanitizedMessage) {
if (!Platform::current()) {
// TODO(rockot): Remove this hack once renderer shutdown sequence is fixed.
return;
}
+
m_state = Uninitialized;
+ // The m_sensor.reset() will release all callbacks and its bound parameters,
+ // therefore, handleSensorError accepts messages by value.
m_sensor.reset();
m_sharedBuffer.reset();
m_sharedBufferHandle.reset();
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698