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

Unified Diff: extensions/renderer/messaging_bindings.h

Issue 2481413004: [Extensions] Make port creation synchronous in unload handlers (Closed)
Patch Set: polish 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
Index: extensions/renderer/messaging_bindings.h
diff --git a/extensions/renderer/messaging_bindings.h b/extensions/renderer/messaging_bindings.h
index b0e9fe780b34f3c9a6ca536c0c19fd6544a62fcf..c2a2810d608316e18f00e3ad37abd8b874dfaa61 100644
--- a/extensions/renderer/messaging_bindings.h
+++ b/extensions/renderer/messaging_bindings.h
@@ -117,6 +117,15 @@ class MessagingBindings : public ObjectBackedNativeHandler {
// The next available local id for a port.
int next_local_id_ = 0;
+ // The number of ports created in the 'beforeunload' event handler.
+ int ports_created_in_before_unload_ = 0;
lazyboy 2016/11/11 01:39:17 since these are unsigned, can make them unsigned i
Devlin 2016/11/12 01:24:30 Done.
+
+ // The number of ports created in the 'unload' event handler.
+ int ports_created_in_unload_ = 0;
+
+ // The number of ports created during the normal lifetime of the context.
lazyboy 2016/11/11 01:39:17 nit: replace "normal lifetime" with something that
Devlin 2016/11/12 01:24:30 Done.
+ int ports_created_normal_ = 0;
+
base::WeakPtrFactory<MessagingBindings> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(MessagingBindings);

Powered by Google App Engine
This is Rietveld 408576698