mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
perf: use type-utils for desktopCapturer.getSources() result serialization (#23549)
This commit is contained in:
@@ -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_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user