Skip to content

Commit b8cc96e

Browse files
smilesa-maurice
authored andcommitted
Removed use of deprecated FutureHandle in Dynamic Links stub.
PiperOrigin-RevId: 264683407
1 parent 066cd3f commit b8cc96e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dynamic_links/src/dynamic_links_stub.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ Future<GeneratedDynamicLink> GetShortLink(
196196
auto long_link = GetLongLink(components);
197197
long_link.warnings.push_back(kLinkShorteningNotSupported);
198198
ReferenceCountedFutureImpl* api = FutureData::Get()->api();
199-
const FutureHandle handle =
200-
api->Alloc<GeneratedDynamicLink>(kDynamicLinksFnGetShortLink);
199+
const auto handle =
200+
api->SafeAlloc<GeneratedDynamicLink>(kDynamicLinksFnGetShortLink);
201201
api->CompleteWithResult(handle, 0, "", long_link);
202202
return GetShortLinkLastResult();
203203
}
@@ -216,8 +216,8 @@ Future<GeneratedDynamicLink> GetShortLink(
216216
long_link.url = long_dynamic_link;
217217
long_link.warnings.push_back(kLinkShorteningNotSupported);
218218
ReferenceCountedFutureImpl* api = FutureData::Get()->api();
219-
const FutureHandle handle =
220-
api->Alloc<GeneratedDynamicLink>(kDynamicLinksFnGetShortLink);
219+
const auto handle =
220+
api->SafeAlloc<GeneratedDynamicLink>(kDynamicLinksFnGetShortLink);
221221
api->CompleteWithResult(handle, 0, "", long_link);
222222
return GetShortLinkLastResult();
223223
}

0 commit comments

Comments
 (0)