| Index: remoting/jingle_glue/javascript_iq_request.cc
|
| diff --git a/remoting/jingle_glue/javascript_iq_request.cc b/remoting/jingle_glue/javascript_iq_request.cc
|
| index ec83365e4ec0849148bc2ba630f5c63d079276a9..0b75c71a51244790a45ed78becd5d36efcb72c61 100644
|
| --- a/remoting/jingle_glue/javascript_iq_request.cc
|
| +++ b/remoting/jingle_glue/javascript_iq_request.cc
|
| @@ -57,8 +57,9 @@ void JavascriptIqRegistry::OnIncomingStanza(const buzz::XmlElement* stanza) {
|
| // JavascriptIqRequest::SendIq(), but remove in
|
| // JavascriptIqRegistry::OnIq(). We should try to keep the
|
| // registration/deregistration in one spot.
|
| - if (it->second->callback_.get()) {
|
| - it->second->callback_->Run(stanza);
|
| + if (it->second->callback_.is_null()) {
|
| + it->second->callback_.Run(stanza);
|
| + it->second->callback_.Reset();
|
| } else {
|
| VLOG(1) << "No callback, so dropping: " << stanza->Str();
|
| }
|
| @@ -90,8 +91,8 @@ void JavascriptIqRequest::SendIq(const std::string& type,
|
| signal_strategy_->SendStanza(MakeIqStanza(type, addressee, iq_body, id));
|
| }
|
|
|
| -void JavascriptIqRequest::set_callback(ReplyCallback* callback) {
|
| - callback_.reset(callback);
|
| +void JavascriptIqRequest::set_callback(const ReplyCallback& callback) {
|
| + callback_ = callback;
|
| }
|
|
|
| } // namespace remoting
|
|
|