fix: reset render_frame_disposed_ after render frame host change (#31401)
* fix: reset render_frame_disposed_ after hang * fix: handle exception in webContents.send
This commit is contained in:
parent
11db6a7d9a
commit
bff20bd769
2 changed files with 11 additions and 3 deletions
|
@ -7,7 +7,11 @@ WebFrameMain.prototype.send = function (channel, ...args) {
|
|||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(false /* internal */, channel, args);
|
||||
try {
|
||||
return this._send(false /* internal */, channel, args);
|
||||
} catch (e) {
|
||||
console.error('Error sending from webFrameMain: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
WebFrameMain.prototype._sendInternal = function (channel, ...args) {
|
||||
|
@ -15,7 +19,11 @@ WebFrameMain.prototype._sendInternal = function (channel, ...args) {
|
|||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(true /* internal */, channel, args);
|
||||
try {
|
||||
return this._send(true /* internal */, channel, args);
|
||||
} catch (e) {
|
||||
console.error('Error sending from webFrameMain: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
WebFrameMain.prototype.postMessage = function (...args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue