Chromium Code Reviews| Index: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
| diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
| index dbeed629a02df14a7bef88672134a0d5b8a1d270..a680398abf3985e072b08953c46935ba665cb5be 100644 |
| --- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
| +++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
| @@ -16,6 +16,7 @@ |
| #include "platform/ScopedOrientationChangeIndicator.h" |
| #include "public/platform/WebScreenInfo.h" |
| #include "public/platform/modules/screen_orientation/WebScreenOrientationClient.h" |
| +#include <memory> |
| namespace blink { |
| @@ -165,12 +166,13 @@ void ScreenOrientationController::setOrientation( |
| notifyDispatcher(); |
| } |
| -void ScreenOrientationController::lock(WebScreenOrientationLockType orientation, |
| - WebLockOrientationCallback* callback) { |
| +void ScreenOrientationController::lock( |
| + WebScreenOrientationLockType orientation, |
| + std::unique_ptr<WebLockOrientationCallback> callback) { |
| // When detached, the client is no longer valid. |
| if (!m_client) |
| return; |
|
rlanday
2016/11/22 18:22:33
I think we've found a memory leak!
|
| - m_client->lockOrientation(orientation, callback); |
| + m_client->lockOrientation(orientation, std::move(callback)); |
| } |
| void ScreenOrientationController::unlock() { |