| 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;
|
|
|