| Index: webrtc/p2p/base/portallocator.h
|
| diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
|
| index 7d2a59f278ccb307ce0266ef89f65234eb291768..7d92f6cb6bdb5fb2a49e03de1abfee3744015f02 100644
|
| --- a/webrtc/p2p/base/portallocator.h
|
| +++ b/webrtc/p2p/base/portallocator.h
|
| @@ -221,8 +221,10 @@ class PortAllocatorSession : public sigslot::has_slots<> {
|
| friend class PortAllocator;
|
| };
|
|
|
| -// Note that this class should only be used on one thread.
|
| -// This includes calling the destructor.
|
| +// This class can be constructed on any thread, but every other method
|
| +// (including the destructor) should be called on the same thread.
|
| +// This allows constructing a PortAllocator subclass on one thread and
|
| +// passing it into an object that uses it on a different thread.
|
| class PortAllocator : public sigslot::has_slots<> {
|
| public:
|
| PortAllocator() :
|
| @@ -232,10 +234,13 @@ class PortAllocator : public sigslot::has_slots<> {
|
| step_delay_(kDefaultStepDelay),
|
| allow_tcp_listen_(true),
|
| candidate_filter_(CF_ALL) {
|
| - // This will allow us to have old behavior on non webrtc clients.
|
| }
|
| virtual ~PortAllocator() {}
|
|
|
| + // This should be called on the PortAllocator's thread before the
|
| + // PortAllocator is used. Subclasses may override this if necessary.
|
| + virtual void Initialize() {}
|
| +
|
| // Set STUN and TURN servers to be used in future sessions, and set
|
| // candidate pool size, as described in JSEP.
|
| //
|
|
|