Commit 6f1faebd authored by avi's avatar avi Committed by Commit Bot

Remove ScopedVector from gin/.

BUG=554289

Review-Url: https://codereview.chromium.org/2965273002
Cr-Commit-Position: refs/heads/master@{#484922}
parent e86c74ee
......@@ -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;
......
......@@ -10,11 +10,11 @@
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/observer_list.h"
#include "gin/gin_export.h"
#include "v8/include/v8.h"
......@@ -77,7 +77,7 @@ class GIN_EXPORT ModuleRegistry {
}
private:
typedef ScopedVector<PendingModule> PendingModuleVector;
typedef std::vector<std::unique_ptr<PendingModule>> PendingModuleVector;
typedef std::multimap<std::string, LoadModuleCallback> LoadModuleCallbackMap;
explicit ModuleRegistry(v8::Isolate* isolate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment