Run the Desktop app in a sandbox
* Turn off node integration in the electron renderer process * Enable the chromium sandbox to put the renderer into its own process * Expose just the ipc module with a preload script * Introduce a little IPC call wrapper so we can call into the renderer process and await on the result. * Use this in a bunch of places we previously used direct calls to electron modules. * Convert other uses of node, eg. use of process to derive the platform (just look at the user agent) * Strip out the desktopCapturer integration which doesn't appear to have ever worked (probably best to just wait until getDisplayMedia() is available in chrome at this point: https://github.com/vector-im/riot-web/issues/4880).
This commit is contained in:
parent
df155293b1
commit
19f1489c92
7 changed files with 198 additions and 144 deletions
|
@ -142,6 +142,10 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
setInterval(this.pollForUpdate.bind(this), POKE_RATE_MS);
|
||||
}
|
||||
|
||||
async canSelfUpdate(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
pollForUpdate() {
|
||||
return this._getVersion().then((ver) => {
|
||||
if (this.runningVersion === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue