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

Unified Diff: src/profiler/strings-storage.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 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
« no previous file with comments | « src/perf-jit.cc ('k') | src/regexp/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/strings-storage.cc
diff --git a/src/profiler/strings-storage.cc b/src/profiler/strings-storage.cc
index 634b6ee24b989e51cd67cf90619989363edc4062..78d8bd28dfcd0fe26dff81fb39b7df6093b9ded9 100644
--- a/src/profiler/strings-storage.cc
+++ b/src/profiler/strings-storage.cc
@@ -4,6 +4,8 @@
#include "src/profiler/strings-storage.h"
+#include <memory>
+
#include "src/base/smart-pointers.h"
#include "src/objects-inl.h"
@@ -81,9 +83,9 @@ const char* StringsStorage::GetName(Name* name) {
String* str = String::cast(name);
int length = Min(kMaxNameSize, str->length());
int actual_length = 0;
- base::SmartArrayPointer<char> data = str->ToCString(
+ std::unique_ptr<char[]> data = str->ToCString(
DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL, 0, length, &actual_length);
- return AddOrDisposeString(data.Detach(), actual_length);
+ return AddOrDisposeString(data.release(), actual_length);
} else if (name->IsSymbol()) {
return "<symbol>";
}
« no previous file with comments | « src/perf-jit.cc ('k') | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698