chore: [extensions] support old APIs when enable_electron_extensions = true (#21812)

This commit is contained in:
Jeremy Apthorp 2020-01-21 09:42:55 -08:00 committed by GitHub
parent dc97fe0640
commit acb5b75057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 1 deletions

View file

@ -15,6 +15,8 @@ v8::Local<v8::Value> Converter<const extensions::Extension*>::ToV8(
const extensions::Extension* extension) {
auto dict = gin::Dictionary::CreateEmpty(isolate);
dict.Set("id", extension->id());
dict.Set("name", extension->name());
dict.Set("version", extension->VersionString());
return gin::ConvertToV8(isolate, dict);
}