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

Unified Diff: src/compiler/pipeline.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: even less redness 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
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 4b96dd300ace84630ee860b101333ebf51ef1c10..627011e9b164a16819222bac52226d8f26a3b92a 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -5,6 +5,7 @@
#include "src/compiler/pipeline.h"
#include <fstream> // NOLINT(readability/streams)
+#include <memory>
#include <sstream>
#include "src/base/adapters.h"
@@ -304,7 +305,7 @@ class PipelineData {
private:
Isolate* const isolate_;
CompilationInfo* const info_;
- base::SmartArrayPointer<char> debug_name_;
+ std::unique_ptr<char[]> debug_name_;
Zone* outer_zone_ = nullptr;
ZonePool* const zone_pool_;
PipelineStatistics* pipeline_statistics_ = nullptr;
@@ -531,7 +532,7 @@ PipelineStatistics* CreatePipelineStatistics(CompilationInfo* info,
if (FLAG_trace_turbo) {
TurboJsonFile json_of(info, std::ios_base::trunc);
Handle<Script> script = info->script();
- base::SmartArrayPointer<char> function_name = info->GetDebugName();
+ std::unique_ptr<char[]> function_name = info->GetDebugName();
int pos = info->shared_info()->start_position();
json_of << "{\"function\":\"" << function_name.get()
<< "\", \"sourcePosition\":" << pos << ", \"source\":\"";

Powered by Google App Engine
This is Rietveld 408576698