reverted renderer process native modules, it crashes

This commit is contained in:
antelle 2020-05-28 10:48:09 +02:00
parent 817b44b152
commit b2a6e1180c
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 1 additions and 7 deletions

View File

@ -14,7 +14,6 @@ const Launcher = {
thirdPartyStoragesSupported: true,
clipboardSupported: true,
req: window.require,
mainProcessModules: ['usb'],
platform() {
return process.platform;
},
@ -28,12 +27,7 @@ const Launcher = {
return this.electron().remote.require(mod);
},
reqNative(mod) {
if (this.mainProcessModules.includes(mod)) {
return this.electron().remote.app.reqNative(mod);
} else {
const fileName = `${mod}-${process.platform}-${process.arch}.node`;
return this.req(`@keeweb/keeweb-native-modules/${fileName}`);
}
return this.electron().remote.app.reqNative(mod);
},
openLink(href) {
if (/^(http|https|ftp|sftp|mailto):/i.test(href)) {