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

Unified Diff: extensions/renderer/resources/messaging.js

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/:/ / Created 4 years, 11 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
Index: extensions/renderer/resources/messaging.js
diff --git a/extensions/renderer/resources/messaging.js b/extensions/renderer/resources/messaging.js
index 5a7ec1e40dc01d492c542729ddaacbd9def8b323..a15497d23efac334c9073830fcdd47d3237ac543 100644
--- a/extensions/renderer/resources/messaging.js
+++ b/extensions/renderer/resources/messaging.js
@@ -76,6 +76,16 @@
this.onDestroy_();
privates(this.onDisconnect).impl.destroy_();
privates(this.onMessage).impl.destroy_();
+ // TODO(robwu): Remove port lifetime management because it is completely
+ // handled in the browser. The renderer's only roles are
+ // 1) rejecting ports so that the browser knows that the renderer is not
+ // interested in the port (this is merely an optimization)
+ // 2) acknowledging port creations, so that the browser knows that the port
+ // was successfully created (from the perspective of the extension), but
+ // then closed for some non-fatal reason.
+ // 3) notifying the browser of explicit port closure via .disconnect().
+ // In other cases (navigations), the browser automatically cleans up the
+ // port.
messagingNatives.PortRelease(this.portId_);
delete ports[this.portId_];
};
« content/public/browser/render_frame_host.h ('K') | « extensions/renderer/messaging_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698