perf: use type-utils for desktopCapturer.getSources() result serialization (#23549)
This commit is contained in:
parent
508c7ac4f9
commit
85fae67966
5 changed files with 11 additions and 22 deletions
|
@ -49,6 +49,8 @@ struct Converter<electron::api::DesktopCapturer::Source> {
|
|||
"appIcon",
|
||||
electron::api::NativeImage::Create(
|
||||
isolate, gfx::Image(GetWindowIcon(source.media_list_source.id))));
|
||||
} else {
|
||||
dict.Set("appIcon", nullptr);
|
||||
}
|
||||
return ConvertToV8(isolate, dict);
|
||||
}
|
||||
|
@ -191,8 +193,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
|
|||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope scope(isolate);
|
||||
gin_helper::CallMethod(this, "_onfinished", captured_sources_,
|
||||
fetch_window_icons_);
|
||||
gin_helper::CallMethod(this, "_onfinished", captured_sources_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue