Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1917)

Unified Diff: extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js

Issue 1136953017: Add fallback mechanism to release Extension ports if the JS context has been destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/messaging_bindings.cc ('k') | extensions/renderer/resources/messaging.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js
diff --git a/extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js b/extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js
index e58e620d2ae19dc0e7e0d7483676ab1ab36811c8..f5be50aecd571bd4fa838a9dc9c3a14656e5989b 100644
--- a/extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js
+++ b/extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js
@@ -66,7 +66,8 @@ WebViewActionRequest.prototype.handleActionRequestEvent = function() {
if (defaultPrevented) {
// Track the lifetime of |request| with the garbage collector.
- MessagingNatives.BindToGC(request, this.defaultAction.bind(this));
+ var portId = -1; // (hack) there is no Extension Port to release
+ MessagingNatives.BindToGC(request, this.defaultAction.bind(this), portId);
} else {
this.defaultAction();
}
« no previous file with comments | « extensions/renderer/messaging_bindings.cc ('k') | extensions/renderer/resources/messaging.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698