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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge. Created 4 years, 6 months 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: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
index c5d64c31eced0d48a56fcbc4d2ec4f7634ec4a7d..f77f08a61eda0139f556e546532d821bfee4c211 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -22,7 +22,8 @@
#include "core/inspector/ScriptArguments.h"
#include "platform/ScriptForbiddenScope.h"
#include "wtf/CurrentTime.h"
-#include "wtf/OwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -66,7 +67,7 @@ void ThreadDebugger::idleFinished(v8::Isolate* isolate)
void ThreadDebugger::beginUserGesture()
{
- m_userGestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingNewUserGesture));
+ m_userGestureIndicator = wrapUnique(new UserGestureIndicator(DefinitelyProcessingNewUserGesture));
}
void ThreadDebugger::endUserGesture()
@@ -333,7 +334,7 @@ void ThreadDebugger::startRepeatingTimer(double interval, V8DebuggerClient::Time
m_timerData.append(data);
m_timerCallbacks.append(callback);
- OwnPtr<Timer<ThreadDebugger>> timer = adoptPtr(new Timer<ThreadDebugger>(this, &ThreadDebugger::onTimer));
+ std::unique_ptr<Timer<ThreadDebugger>> timer = wrapUnique(new Timer<ThreadDebugger>(this, &ThreadDebugger::onTimer));
Timer<ThreadDebugger>* timerPtr = timer.get();
m_timers.append(std::move(timer));
timerPtr->startRepeating(interval, BLINK_FROM_HERE);
@@ -355,7 +356,7 @@ void ThreadDebugger::cancelTimer(void* data)
void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer)
{
for (size_t index = 0; index < m_timers.size(); ++index) {
- if (m_timers[index] == timer) {
+ if (m_timers[index].get() == timer) {
m_timerCallbacks[index](m_timerData[index]);
return;
}

Powered by Google App Engine
This is Rietveld 408576698