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

Unified Diff: src/perf-jit.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/parsing/parser.cc ('k') | src/profiler/strings-storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/perf-jit.cc
diff --git a/src/perf-jit.cc b/src/perf-jit.cc
index b318a4e7c0e59f224d7634ec4b376f4e787b2528..a8c7255396f6529e190a2d6c407c1728ccfb9f46 100644
--- a/src/perf-jit.cc
+++ b/src/perf-jit.cc
@@ -27,6 +27,8 @@
#include "src/perf-jit.h"
+#include <memory>
+
#include "src/assembler.h"
#include "src/eh-frame.h"
#include "src/objects-inl.h"
@@ -256,7 +258,7 @@ void PerfJitLogger::LogWriteDebugInfo(Code* code, SharedFunctionInfo* shared) {
Handle<Object> name_or_url(Script::GetNameOrSourceURL(script));
int name_length = 0;
- base::SmartArrayPointer<char> name_string;
+ std::unique_ptr<char[]> name_string;
if (name_or_url->IsString()) {
name_string =
Handle<String>::cast(name_or_url)
@@ -268,7 +270,7 @@ void PerfJitLogger::LogWriteDebugInfo(Code* code, SharedFunctionInfo* shared) {
char* buffer = NewArray<char>(name_length);
base::OS::StrNCpy(buffer, name_length + 1, unknown,
static_cast<size_t>(name_length));
- name_string = base::SmartArrayPointer<char>(buffer);
+ name_string = std::unique_ptr<char[]>(buffer);
}
DCHECK_EQ(name_length, strlen(name_string.get()));
« no previous file with comments | « src/parsing/parser.cc ('k') | src/profiler/strings-storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698