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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl

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/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
index cef5ab891c9a8d5742e82ed44deacf2b45aa3182..56f37311366a5e25e999c80d9da12498d4498a08 100644
--- a/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
@@ -3,8 +3,10 @@
#include "{{namespace}}Names.h"
+#include "wtf/PtrUtil.h"
#include "wtf/StaticConstructors.h"
#include "wtf/StdLibExtras.h"
+#include <memory>
namespace blink {
namespace {{namespace}}Names {
@@ -22,9 +24,9 @@ const {{namespace}}QualifiedName& {{tag|symbol}}Tag = reinterpret_cast<{{namespa
{% endfor %}
-PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags()
+std::unique_ptr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags()
{
- OwnPtr<const {{namespace}}QualifiedName*[]> tags = adoptArrayPtr(new const {{namespace}}QualifiedName*[{{namespace}}TagsCount]);
+ std::unique_ptr<const {{namespace}}QualifiedName*[]> tags = wrapArrayUnique(new const {{namespace}}QualifiedName*[{{namespace}}TagsCount]);
for (size_t i = 0; i < {{namespace}}TagsCount; i++)
tags[i] = reinterpret_cast<{{namespace}}QualifiedName*>(&{{suffix}}TagStorage) + i;
return tags;
@@ -40,9 +42,9 @@ const QualifiedName& {{attr|symbol}}Attr = reinterpret_cast<QualifiedName*>(&{{s
{% endfor %}
{% if namespace != 'HTML' %}
-PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs()
+std::unique_ptr<const QualifiedName*[]> get{{namespace}}Attrs()
{
- OwnPtr<const QualifiedName*[]> attrs = adoptArrayPtr(new const QualifiedName*[{{namespace}}AttrsCount]);
+ std::unique_ptr<const QualifiedName*[]> attrs = wrapArrayUnique(new const QualifiedName*[{{namespace}}AttrsCount]);
for (size_t i = 0; i < {{namespace}}AttrsCount; i++)
attrs[i] = reinterpret_cast<QualifiedName*>(&{{suffix}}AttrStorage) + i;
return attrs;

Powered by Google App Engine
This is Rietveld 408576698