зеркало из https://github.com/electron/electron.git
fix: pdf viewer permissions (#29210)
* fix: pdf viewer permissions * fixup for getAllExtensions
This commit is contained in:
Родитель
cd3c6f9e37
Коммит
d79ebc6dc6
|
@ -851,7 +851,7 @@ v8::Local<v8::Value> Session::GetAllExtensions() {
|
|||
std::vector<const extensions::Extension*> extensions_vector;
|
||||
for (const auto& extension : *installed_extensions) {
|
||||
if (extension->location() !=
|
||||
extensions::mojom::ManifestLocation::kExternalComponent)
|
||||
extensions::mojom::ManifestLocation::kComponent)
|
||||
extensions_vector.emplace_back(extension.get());
|
||||
}
|
||||
return gin::ConvertToV8(isolate_, extensions_vector);
|
||||
|
|
|
@ -119,8 +119,7 @@ void ElectronExtensionSystem::LoadComponentExtensions() {
|
|||
root_directory = root_directory.Append(FILE_PATH_LITERAL("pdf"));
|
||||
scoped_refptr<const Extension> pdf_extension =
|
||||
extensions::Extension::Create(
|
||||
root_directory,
|
||||
extensions::mojom::ManifestLocation::kExternalComponent,
|
||||
root_directory, extensions::mojom::ManifestLocation::kComponent,
|
||||
*pdf_manifest, extensions::Extension::REQUIRE_KEY, &utf8_error);
|
||||
extension_loader_->registrar()->AddExtension(pdf_extension);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче