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

Unified Diff: gin/modules/module_registry.cc

Issue 1550693002: Global conversion of Pass()→std::move() on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/isolate_holder.cc ('k') | gin/per_isolate_data.cc » ('j') | 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 10d5464f670a58048feca220c29884a0e0e78dd5..deec1874b485242828fce9b09a058ad13c543be3 100644
--- a/gin/modules/module_registry.cc
+++ b/gin/modules/module_registry.cc
@@ -6,8 +6,8 @@
#include <stddef.h>
#include <stdint.h>
-
#include <string>
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -83,7 +83,7 @@ void Define(const v8::FunctionCallbackInfo<Value>& info) {
ModuleRegistry* registry =
ModuleRegistry::From(args.isolate()->GetCurrentContext());
- registry->AddPendingModule(args.isolate(), pending.Pass());
+ registry->AddPendingModule(args.isolate(), std::move(pending));
}
WrapperInfo g_wrapper_info = { kEmbedderNativeGin };
@@ -161,7 +161,7 @@ void ModuleRegistry::AddPendingModule(Isolate* isolate,
scoped_ptr<PendingModule> pending) {
const std::string pending_id = pending->id;
const std::vector<std::string> pending_dependencies = pending->dependencies;
- AttemptToLoad(isolate, pending.Pass());
+ AttemptToLoad(isolate, std::move(pending));
FOR_EACH_OBSERVER(ModuleRegistryObserver, observer_list_,
OnDidAddPendingModule(pending_id, pending_dependencies));
}
@@ -258,7 +258,7 @@ bool ModuleRegistry::AttemptToLoad(Isolate* isolate,
pending_modules_.push_back(pending.release());
return false;
}
- return Load(isolate, pending.Pass());
+ return Load(isolate, std::move(pending));
}
v8::Local<v8::Value> ModuleRegistry::GetModule(v8::Isolate* isolate,
@@ -278,7 +278,7 @@ void ModuleRegistry::AttemptToLoadMoreModules(Isolate* isolate) {
for (size_t i = 0; i < pending_modules.size(); ++i) {
scoped_ptr<PendingModule> pending(pending_modules[i]);
pending_modules[i] = NULL;
- if (AttemptToLoad(isolate, pending.Pass()))
+ if (AttemptToLoad(isolate, std::move(pending)))
keep_trying = true;
}
}
« no previous file with comments | « gin/isolate_holder.cc ('k') | gin/per_isolate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698