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

Unified Diff: extensions/renderer/messaging_bindings.h

Issue 2514523002: [Extensions] Make port creation synchronous in unload handlers (Closed)
Patch Set: Created 4 years, 1 month 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/extension_frame_helper.cc ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/messaging_bindings.h
diff --git a/extensions/renderer/messaging_bindings.h b/extensions/renderer/messaging_bindings.h
index b0e9fe780b34f3c9a6ca536c0c19fd6544a62fcf..758187e1782580526f83b37fb54613e018bc186b 100644
--- a/extensions/renderer/messaging_bindings.h
+++ b/extensions/renderer/messaging_bindings.h
@@ -115,7 +115,17 @@ class MessagingBindings : public ObjectBackedNativeHandler {
PortMap disconnected_ports_;
// The next available local id for a port.
- int next_local_id_ = 0;
+ size_t next_local_id_ = 0;
+
+ // The number of ports created in the 'beforeunload' event handler.
+ size_t ports_created_in_before_unload_ = 0;
+
+ // The number of ports created in the 'unload' event handler.
+ size_t ports_created_in_unload_ = 0;
+
+ // The number of ports created during during any time that isn't in the unload
+ // or beforeunload handlers.
+ int ports_created_normal_ = 0;
base::WeakPtrFactory<MessagingBindings> weak_ptr_factory_;
« no previous file with comments | « extensions/renderer/extension_frame_helper.cc ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698