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

Unified Diff: gin/modules/module_registry.cc

Issue 2965273002: Remove ScopedVector from gin/. (Closed)
Patch Set: Created 3 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 | « gin/modules/module_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/modules/module_registry.cc
diff --git a/gin/modules/module_registry.cc b/gin/modules/module_registry.cc
index 99783d379202b461b46981547607a56404a52989..9681a0e89c8267e424494bad48ae20ffc2491743 100644
--- a/gin/modules/module_registry.cc
+++ b/gin/modules/module_registry.cc
@@ -258,7 +258,7 @@ bool ModuleRegistry::Load(Isolate* isolate,
bool ModuleRegistry::AttemptToLoad(Isolate* isolate,
std::unique_ptr<PendingModule> pending) {
if (!CheckDependencies(pending.get())) {
- pending_modules_.push_back(pending.release());
+ pending_modules_.push_back(std::move(pending));
return false;
}
return Load(isolate, std::move(pending));
@@ -279,7 +279,7 @@ void ModuleRegistry::AttemptToLoadMoreModules(Isolate* isolate) {
PendingModuleVector pending_modules;
pending_modules.swap(pending_modules_);
for (size_t i = 0; i < pending_modules.size(); ++i) {
- std::unique_ptr<PendingModule> pending(pending_modules[i]);
+ std::unique_ptr<PendingModule> pending(std::move(pending_modules[i]));
pending_modules[i] = NULL;
if (AttemptToLoad(isolate, std::move(pending)))
keep_trying = true;
« no previous file with comments | « gin/modules/module_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698