|
1 | | -(function() { |
| 1 | +(function () { |
2 | 2 | // Define the window start time before the requires so we get a more accurate |
3 | 3 | // window:start marker. |
4 | 4 | const startWindowTime = Date.now(); |
|
20 | 20 | } |
21 | 21 | StartupTime.addMarker('window:start', startWindowTime); |
22 | 22 |
|
23 | | - window.onload = async function() { |
| 23 | + window.onload = async function () { |
24 | 24 | try { |
25 | 25 | StartupTime.addMarker('window:onload:start'); |
26 | 26 | const startTime = Date.now(); |
27 | | - await Promise.all([ |
28 | | - require('second-mate').ready |
29 | | - ]) |
| 27 | + await require('second-mate').ready; |
30 | 28 |
|
31 | | - process.on('unhandledRejection', function(error, promise) { |
| 29 | + process.on('unhandledRejection', function (error, promise) { |
32 | 30 | console.error( |
33 | 31 | 'Unhandled promise rejection %o with error: %o', |
34 | 32 | promise, |
|
120 | 118 |
|
121 | 119 | StartupTime.addMarker('window:initialize:start'); |
122 | 120 |
|
123 | | - return initialize({ blobStore: blobStore }).then(function() { |
| 121 | + return initialize({ blobStore: blobStore }).then(function () { |
124 | 122 | StartupTime.addMarker('window:initialize:end'); |
125 | 123 | electron.ipcRenderer.send('window-command', 'window:loaded'); |
126 | 124 | }); |
|
130 | 128 | function profile() { |
131 | 129 | console.profile('startup'); |
132 | 130 | const startTime = Date.now(); |
133 | | - setupWindow().then(function() { |
| 131 | + setupWindow().then(function () { |
134 | 132 | setLoadTime(Date.now() - startTime + initialTime); |
135 | 133 | console.profileEnd('startup'); |
136 | 134 | console.log( |
|
0 commit comments