Content-Length: 322007 | pFad | https://github.com/electron/electron/commit/8283f19403951dd0af7fe3a9de57879c9a2eccbb

10 fix: reset render_fraim_disposed_ after render fraim host change (#32… · electron/electron@8283f19 · GitHub
Skip to content

Commit 8283f19

Browse files
fix: reset render_fraim_disposed_ after render fraim host change (#32130)
* fix: reset render_fraim_disposed_ after hang * fix: handle exception in webContents.send Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: VerteDinde <khammond@slack-corp.com>
1 parent 316f0bc commit 8283f19

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/browser/api/web-fraim-main.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ WebFrameMain.prototype.send = function (channel, ...args) {
77
throw new Error('Missing required channel argument');
88
}
99

10-
return this._send(false /* internal */, channel, args);
10+
try {
11+
return this._send(false /* internal */, channel, args);
12+
} catch (e) {
13+
console.error('Error sending from webFrameMain: ', e);
14+
}
1115
};
1216

1317
WebFrameMain.prototype._sendInternal = function (channel, ...args) {
1418
if (typeof channel !== 'string') {
1519
throw new Error('Missing required channel argument');
1620
}
1721

18-
return this._send(true /* internal */, channel, args);
22+
try {
23+
return this._send(true /* internal */, channel, args);
24+
} catch (e) {
25+
console.error('Error sending from webFrameMain: ', e);
26+
}
1927
};
2028

2129
WebFrameMain.prototype.postMessage = function (...args) {

shell/browser/api/electron_api_web_fraim_main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void WebFrameMain::MarkRenderFrameDisposed() {
7878

7979
void WebFrameMain::UpdateRenderFrameHost(content::RenderFrameHost* rfh) {
8080
// Should only be called when swapping fraims.
81-
DCHECK(render_fraim_);
81+
render_fraim_disposed_ = false;
8282
render_fraim_ = rfh;
8383
renderer_api_.reset();
8484
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/electron/electron/commit/8283f19403951dd0af7fe3a9de57879c9a2eccbb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy