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

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: First attempt to land. 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 1de42b5dbe05252a1a8eacf5bbf03ba6b9cb6ec5..abb5fe4cc6e4c4edd23046e5ad0510f0456b7815 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()
@@ -322,7 +323,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);
@@ -344,7 +345,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