security: only handle related IPCs when <webview> tag is enabled (#15859)

* refactor: move guest-view-manager related IPC handling out of rpc-server

* feat: only handle related IPCs when <webview> tag is enabled
This commit is contained in:
Milan Burda 2018-11-30 10:44:38 +01:00 committed by Cheng Zhao
parent 8cca1c987b
commit 8483cb4aa7
4 changed files with 63 additions and 43 deletions

View file

@ -186,7 +186,7 @@ class SrcAttribute extends WebViewAttribute {
const method = 'loadURL'
const args = [this.getValue(), opts]
const [error] = ipcRenderer.sendSync('ELECTRON_BROWSER_SYNC_CALL_TO_GUEST_VIEW', guestInstanceId, method, args)
const [error] = ipcRenderer.sendSync('ELECTRON_GUEST_VIEW_MANAGER_SYNC_CALL', guestInstanceId, method, args)
if (error) {
throw errorUtils.deserialize(error)
}