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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 7 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/bindings/core/v8/SourceLocation.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
index 6a03e9e218f54ef407c4923065f588b23958f13e..12ae195d903a75d0da90b0c1c753dff7bb20983c 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
@@ -19,7 +19,7 @@ namespace blink {
namespace {
-PassOwnPtr<V8StackTrace> captureStackTrace()
+std::unique_ptr<V8StackTrace> captureStackTrace()
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
@@ -39,7 +39,7 @@ PassOwnPtr<V8StackTrace> captureStackTrace()
// static
PassOwnPtr<SourceLocation> SourceLocation::capture(const String& url, unsigned lineNumber, unsigned columnNumber)
{
- OwnPtr<V8StackTrace> stackTrace = captureStackTrace();
+ std::unique_ptr<V8StackTrace> stackTrace = captureStackTrace();
if (stackTrace && !stackTrace->isEmpty())
return SourceLocation::create(stackTrace->topSourceURL(), stackTrace->topLineNumber(), stackTrace->topColumnNumber(), std::move(stackTrace), 0);
return SourceLocation::create(url, lineNumber, columnNumber, std::move(stackTrace));
@@ -48,7 +48,7 @@ PassOwnPtr<SourceLocation> SourceLocation::capture(const String& url, unsigned l
// static
PassOwnPtr<SourceLocation> SourceLocation::capture(ExecutionContext* executionContext)
{
- OwnPtr<V8StackTrace> stackTrace = captureStackTrace();
+ std::unique_ptr<V8StackTrace> stackTrace = captureStackTrace();
if (stackTrace && !stackTrace->isEmpty())
return SourceLocation::create(stackTrace->topSourceURL(), stackTrace->topLineNumber(), stackTrace->topColumnNumber(), std::move(stackTrace), 0);
@@ -66,12 +66,12 @@ PassOwnPtr<SourceLocation> SourceLocation::capture(ExecutionContext* executionCo
}
// static
-PassOwnPtr<SourceLocation> SourceLocation::create(const String& url, unsigned lineNumber, unsigned columnNumber, PassOwnPtr<V8StackTrace> stackTrace, int scriptId)
+PassOwnPtr<SourceLocation> SourceLocation::create(const String& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace> stackTrace, int scriptId)
{
return adoptPtr(new SourceLocation(url, lineNumber, columnNumber, std::move(stackTrace), scriptId));
}
-SourceLocation::SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber, PassOwnPtr<V8StackTrace> stackTrace, int scriptId)
+SourceLocation::SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace> stackTrace, int scriptId)
: m_url(url)
, m_lineNumber(lineNumber)
, m_columnNumber(columnNumber)
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/SourceLocation.h ('k') | third_party/WebKit/Source/core/inspector/ConsoleMessage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698