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

Issue 711413005: Use WeakBindingSet to manage inspector connections (Closed)

Created:
6 years, 1 month ago by jamesr
Modified:
6 years, 1 month ago
Reviewers:
Aaron Boodman, eseidel
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, esprehn, yzshen+watch_chromium.org, abarth-chromium, darin (slow to review), ben+mojo_chromium.org, ojan, DaveMoore
Base URL:
git@github.com:domokit/mojo.git@connector
Project:
mojo
Visibility:
Public.

Description

Use WeakBindingSet to manage inspector connections The sky inspector service wants to implement a 1:N broadcast interface with whichever frontends want to connect. This manages the pipes using a WeakBindingSet, which is a set of bindings owned by the pipe combined with a list of weak pointers to those bindings allowing sending messages to all connected clients without having to explicitly keep track of which clients are connected at a particular point in time. R=eseidel@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/f9dd9b84a5945c5d4d296540f5d849fb9505dd0b

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -128 lines) Patch
M mojo/common/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A mojo/common/weak_binding_set.h View 1 2 3 4 1 chunk +92 lines, -0 lines 4 comments Download
M mojo/public/cpp/bindings/binding.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M sky/services/inspector/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sky/services/inspector/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sky/services/inspector/server.cc View 1 2 3 4 6 chunks +25 lines, -127 lines 1 comment Download

Messages

Total messages: 11 (1 generated)
jamesr
This depends on https://codereview.chromium.org/718473003/ Aaron - I've tried to implement the WeakSet idea with FrontendWeakBinding. ...
6 years, 1 month ago (2014-11-12 00:53:12 UTC) #2
Aaron Boodman
Yup, this is it. Bummer about WeakPtr.
6 years, 1 month ago (2014-11-12 02:36:04 UTC) #3
eseidel
That's definitely better than what we have. Still some verbiage.
6 years, 1 month ago (2014-11-12 02:39:35 UTC) #4
jamesr
https://codereview.chromium.org/711413005/diff/20001/sky/services/inspector/server.cc File sky/services/inspector/server.cc (right): https://codereview.chromium.org/711413005/diff/20001/sky/services/inspector/server.cc#newcode28 sky/services/inspector/server.cc:28: // This provides a binding to an InspectorFrontend implementation ...
6 years, 1 month ago (2014-11-12 20:47:38 UTC) #5
jamesr
Eric - PTAL at sky/services/inspector/ and see what you think about the magic level there. ...
6 years, 1 month ago (2014-11-13 22:49:50 UTC) #6
eseidel
As a user, this looks great to me. https://codereview.chromium.org/711413005/diff/80001/sky/services/inspector/server.cc File sky/services/inspector/server.cc (right): https://codereview.chromium.org/711413005/diff/80001/sky/services/inspector/server.cc#newcode89 sky/services/inspector/server.cc:89: frontend_bindings_.CloseAllBindings(); ...
6 years, 1 month ago (2014-11-14 00:30:16 UTC) #7
jamesr
PTAL
6 years, 1 month ago (2014-11-18 23:10:35 UTC) #8
eseidel
lgtm https://codereview.chromium.org/711413005/diff/80001/mojo/common/weak_binding_set.h File mojo/common/weak_binding_set.h (right): https://codereview.chromium.org/711413005/diff/80001/mojo/common/weak_binding_set.h#newcode33 mojo/common/weak_binding_set.h:33: if (it.get()) Does it not coerce to bool? ...
6 years, 1 month ago (2014-11-18 23:47:50 UTC) #9
jamesr
https://codereview.chromium.org/711413005/diff/80001/mojo/common/weak_binding_set.h File mojo/common/weak_binding_set.h (right): https://codereview.chromium.org/711413005/diff/80001/mojo/common/weak_binding_set.h#newcode33 mojo/common/weak_binding_set.h:33: if (it.get()) On 2014/11/18 23:47:49, eseidel wrote: > Does ...
6 years, 1 month ago (2014-11-19 00:17:18 UTC) #10
jamesr
6 years, 1 month ago (2014-11-19 00:20:16 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
f9dd9b84a5945c5d4d296540f5d849fb9505dd0b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698