Description[Presentation API] Limit the number of pending Start/JoinSession
requests.
For StartSession, PSImpl keeps a queue of StartSession requests to be
processed. (It can only process one at a time). If the queue has
reached maximum allowed size (10), subsequent incoming requests will
be immediately rejected.
For Joinsession, PSImpl keeps a map of currently JoinSession requests
that are currently processed. If the map reached maximum allowed size
(10), subsequent incoming requests will be immediately rejected.
Also, tried to simplify some of the cleanup flow for
NewSessionMojoCallbacks by introducing a wrapper class that ensures
callbacks are not dropped. Currently the cleanup logic is sprinkled
all over the file so hopefully this makes things cleaner.
We could generalize the callback wrapper pattern in the future if
it makes necessary.
BUG=412331
Committed: https://crrev.com/27e2b56b9acea83000624bea149bb7154e916d8b
Cr-Commit-Position: refs/heads/master@{#330203}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressed Anton's comments #
Total comments: 8
Patch Set 3 : use static counter, move generator to anonymous namespace #Patch Set 4 : fix variable name #Patch Set 5 : rm unused function declaration #
Messages
Total messages: 16 (4 generated)
|