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

Unified Diff: src/debug/debug-scopes.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/debug/debug-scopes.cc
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
index a68f9cc62477e7473b433a39f5d455587250eb04..0acecaf853393c8cb5c2b40769c7115553c9bc57 100644
--- a/src/debug/debug-scopes.cc
+++ b/src/debug/debug-scopes.cc
@@ -4,6 +4,8 @@
#include "src/debug/debug-scopes.h"
+#include <memory>
+
#include "src/ast/scopes.h"
#include "src/compiler.h"
#include "src/debug/debug.h"
@@ -85,11 +87,11 @@ ScopeIterator::ScopeIterator(Isolate* isolate, FrameInspector* frame_inspector,
// Reparse the code and analyze the scopes.
// Check whether we are in global, eval or function code.
Zone zone(isolate->allocator());
- base::SmartPointer<ParseInfo> info;
+ std::unique_ptr<ParseInfo> info;
if (scope_info->scope_type() != FUNCTION_SCOPE) {
// Global or eval code.
Handle<Script> script(Script::cast(shared_info->script()));
- info.Reset(new ParseInfo(&zone, script));
+ info.reset(new ParseInfo(&zone, script));
info->set_toplevel();
if (scope_info->scope_type() == SCRIPT_SCOPE) {
info->set_global();
@@ -103,7 +105,7 @@ ScopeIterator::ScopeIterator(Isolate* isolate, FrameInspector* frame_inspector,
}
} else {
// Inner function.
- info.Reset(new ParseInfo(&zone, function));
+ info.reset(new ParseInfo(&zone, function));
}
Scope* scope = NULL;
if (Compiler::ParseAndAnalyze(info.get())) scope = info->literal()->scope();

Powered by Google App Engine
This is Rietveld 408576698