@@ -128,17 +128,18 @@ void InvitesReceiverInternal::ReceivedInviteCallback(
128128Future<void > InvitesReceiverInternal::ConvertInvitation (
129129 const char * invitation_id) {
130130 if (!future_impl_.ValidFuture (future_handle_convert_)) {
131- future_handle_convert_ = future_impl_.Alloc <void >(kInvitesFnConvert );
131+ future_handle_convert_ = future_impl_.SafeAlloc <void >(kInvitesFnConvert );
132132 if (!PerformConvertInvitation (invitation_id)) {
133133 future_impl_.Complete (future_handle_convert_, kConvertFailedCode ,
134134 kConvertFailedMessage );
135135 // This will tell all of the pending Futures that we have failed. Once all
136136 // those futures are gone, the RefFuture will automatically be deleted.
137- future_handle_convert_ = ReferenceCountedFutureImpl ::kInvalidHandle ;
137+ future_handle_convert_ = SafeFutureHandle< void > ::kInvalidHandle ;
138138 }
139139 } else {
140140 // If there's already a convert in progress, fail.
141- const FutureHandle handle = future_impl_.Alloc <void >(kInvitesFnConvert );
141+ const SafeFutureHandle<void > handle =
142+ future_impl_.SafeAlloc <void >(kInvitesFnConvert );
142143 future_impl_.Complete (handle, kConvertInProgressCode ,
143144 kConvertInProgressMessage );
144145 }
@@ -155,7 +156,7 @@ void InvitesReceiverInternal::ConvertedInviteCallback(
155156 std::string error_message) {
156157 future_impl_.Complete (future_handle_convert_, result_code,
157158 error_message.c_str ());
158- future_handle_convert_ = ReferenceCountedFutureImpl ::kInvalidHandle ;
159+ future_handle_convert_ = SafeFutureHandle< void > ::kInvalidHandle ;
159160}
160161
161162} // namespace internal
0 commit comments