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

Unified Diff: src/untrusted/pll_loader/pll_loader.h

Issue 1832623002: PNaCl Dynamic Linking: Using unordered_set to disallow duplicate modules. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Using unordered_set, preserving vector. Created 4 years, 9 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 | « no previous file | src/untrusted/pll_loader/pll_loader.cc » ('j') | src/untrusted/pll_loader/pll_loader.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/pll_loader/pll_loader.h
diff --git a/src/untrusted/pll_loader/pll_loader.h b/src/untrusted/pll_loader/pll_loader.h
index 65577f51f7388f2abc3cc83f42b233139f181836..a033dfd72e3834937909d3f38bf8d97e8e17b781 100644
--- a/src/untrusted/pll_loader/pll_loader.h
+++ b/src/untrusted/pll_loader/pll_loader.h
@@ -5,6 +5,8 @@
#ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_
#define NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ 1
+#include <string>
+#include <unordered_set>
#include <vector>
#include "native_client/src/untrusted/pll_loader/pll_root.h"
@@ -53,6 +55,9 @@ class ModuleSet {
void ResolveRefs();
private:
+ // An unordered set of "sonames" (to see if a module has been loaded) and the
+ // modules themselves.
+ std::unordered_set<std::string> sonames_;
std::vector<PLLModule> modules_;
};
« no previous file with comments | « no previous file | src/untrusted/pll_loader/pll_loader.cc » ('j') | src/untrusted/pll_loader/pll_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698