Skip to content

Commit 4e31ae7

Browse files
committed
💄
1 parent 46e8f20 commit 4e31ae7

File tree

1 file changed

+8
-8
lines changed
  • src/vs/base/parts/sandbox/electron-browser

1 file changed

+8
-8
lines changed

src/vs/base/parts/sandbox/electron-browser/preload.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,24 +211,24 @@
211211
ipcMessagePort: {
212212

213213
/**
214-
* @param {string} channelResponse
215-
* @param {string} requestNonce
214+
* @param {string} responseChannel
215+
* @param {string} nonce
216216
*/
217-
acquire(channelResponse, requestNonce) {
218-
if (validateIPC(channelResponse)) {
217+
acquire(responseChannel, nonce) {
218+
if (validateIPC(responseChannel)) {
219219
const responseListener = (/** @type {IpcRendererEvent} */ e, /** @type {string} */ responseNonce) => {
220220
// validate that the nonce from the response is the same
221221
// as when requested. and if so, use `postMessage` to
222222
// send the `MessagePort` safely over, even when context
223223
// isolation is enabled
224-
if (requestNonce === responseNonce) {
225-
ipcRenderer.off(channelResponse, responseListener);
226-
window.postMessage(requestNonce, '*', e.ports);
224+
if (nonce === responseNonce) {
225+
ipcRenderer.off(responseChannel, responseListener);
226+
window.postMessage(nonce, '*', e.ports);
227227
}
228228
};
229229

230230
// handle reply from main
231-
ipcRenderer.on(channelResponse, responseListener);
231+
ipcRenderer.on(responseChannel, responseListener);
232232
}
233233
}
234234
},

0 commit comments

Comments
 (0)