File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/electron/src/main/attributes Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,16 @@ export class GpuAttributeProvider implements BacktraceAttributeProvider {
4949 private _attributes ?: Record < string , unknown > ;
5050
5151 constructor ( ) {
52+ // getGPUInfo may not be supported on earlier versions of Electron
5253 if ( ! app . getGPUInfo ) {
5354 return ;
5455 }
5556
56- app . on ( 'gpu-info-update' , ( ) =>
57+ // Collect this information only once
58+ // getGPUInfo causes 'gpu-info-update' to be emitted again essentially causing a loop
59+ // https://github.com/electron/electron/issues/30827
60+ // It is unlikely to change again within runtime of the application
61+ app . once ( 'gpu-info-update' , ( ) =>
5762 app
5863 . getGPUInfo ( 'complete' )
5964 . then ( ( info ) => {
You can’t perform that action at this time.
0 commit comments