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

Unified Diff: content/browser/device_orientation/accelerometer_mac.cc

Issue 11458003: Remove scoped_refptr::release which is confusing and causes leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years 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
Index: content/browser/device_orientation/accelerometer_mac.cc
diff --git a/content/browser/device_orientation/accelerometer_mac.cc b/content/browser/device_orientation/accelerometer_mac.cc
index 6ebe7e3de544c33f380b707168bd85c1be596497..04c5d71b65c213c01b5400122be7bc8dd921e17d 100644
--- a/content/browser/device_orientation/accelerometer_mac.cc
+++ b/content/browser/device_orientation/accelerometer_mac.cc
@@ -93,7 +93,8 @@ const Orientation* AccelerometerMac::GetOrientation() {
DCHECK_GE(orientation->gamma(), -90.0);
DCHECK_LT(orientation->gamma(), 90.0);
- return orientation.release();
+ orientation->AddRef();
+ return orientation.get();
}
bool AccelerometerMac::Init() {

Powered by Google App Engine
This is Rietveld 408576698