Skip to content

Commit 412f8bd

Browse files
committed
Set block storage for task variable.
1 parent da53723 commit 412f8bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/src/ios/controller_ios.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
bool ControllerInternal::Pause() {
4444
MutexLock mutex(pending_calls_mutex_);
45-
FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
45+
__block FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
4646
if (task) {
4747
if ([task respondsToSelector:@selector(pause)]) {
4848
util::DispatchAsyncSafeMainQueue(^() {
@@ -60,7 +60,7 @@
6060

6161
bool ControllerInternal::Resume() {
6262
MutexLock mutex(pending_calls_mutex_);
63-
FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
63+
__block FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
6464
if (task) {
6565
if ([task respondsToSelector:@selector(resume)]) {
6666
util::DispatchAsyncSafeMainQueue(^() {
@@ -78,7 +78,7 @@
7878

7979
bool ControllerInternal::Cancel() {
8080
MutexLock mutex(pending_calls_mutex_);
81-
FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
81+
__block FIRStorageObservableTask<FIRStorageTaskManagement> *task = task_impl();
8282
if (task) {
8383
if ([task respondsToSelector:@selector(cancel)]) {
8484
util::DispatchAsyncSafeMainQueue(^() {

0 commit comments

Comments
 (0)