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

Unified Diff: extensions/common/manifest_handlers/shared_module_info.cc

Issue 264923011: Add a whitelist check for nacl-nonsfi mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add includes (windows compile fail) Created 6 years, 7 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 | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest_handlers/shared_module_info.cc
diff --git a/extensions/common/manifest_handlers/shared_module_info.cc b/extensions/common/manifest_handlers/shared_module_info.cc
index ac95ee5b07440270e2afb9bb64272c2981473597..66a06e9a6a74af0cab303f075a12a435b180373d 100644
--- a/extensions/common/manifest_handlers/shared_module_info.cc
+++ b/extensions/common/manifest_handlers/shared_module_info.cc
@@ -86,6 +86,11 @@ bool SharedModuleInfo::IsExportAllowed(const Extension* extension,
// static
bool SharedModuleInfo::IsExportAllowedByWhitelist(const Extension* extension,
const std::string& other_id) {
+ // Sanity check. In case the caller did not check |extension| to make sure it
+ // is a shared module, we do not want it to appear that the extension with
+ // |other_id| importing |extension| is valid.
+ if (!SharedModuleInfo::IsSharedModule(extension))
+ return false;
const SharedModuleInfo& info = GetSharedModuleInfo(extension);
if (info.export_whitelist_.empty())
return true;
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698