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

Unified Diff: src/compiler.cc

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: 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.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index a05ff8f75ac3c382a8791130eadcf72681b5c6c5..31bd4e0958263d60195df78b5d8b5fa846395fa0 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -773,7 +773,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK(!isolate->has_pending_exception());
PostponeInterruptsScope postpone(isolate);
bool use_turbofan = UseTurboFan(shared);
- base::SmartPointer<CompilationJob> job(
+ std::unique_ptr<CompilationJob> job(
use_turbofan ? compiler::Pipeline::NewCompilationJob(function)
: new HCompilationJob(function));
CompilationInfo* info = job->info();
@@ -816,7 +816,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
if (mode == Compiler::CONCURRENT) {
if (GetOptimizedCodeLater(job.get())) {
- job.Detach(); // The background recompile job owns this now.
+ job.release(); // The background recompile job owns this now.
return isolate->builtins()->InOptimizationQueue();
}
} else {
@@ -1816,7 +1816,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCodeForOSR(Handle<JSFunction> function,
void Compiler::FinalizeCompilationJob(CompilationJob* raw_job) {
// Take ownership of compilation job. Deleting job also tears down the zone.
- base::SmartPointer<CompilationJob> job(raw_job);
+ std::unique_ptr<CompilationJob> job(raw_job);
CompilationInfo* info = job->info();
Isolate* isolate = info->isolate();

Powered by Google App Engine
This is Rietveld 408576698