File tree Expand file tree Collapse file tree 8 files changed +30
-27
lines changed Expand file tree Collapse file tree 8 files changed +30
-27
lines changed Original file line number Diff line number Diff line change
1
+ # 7.3.0
2
+ - [ Fixed] Verify block is still alive before calling it in task callbacks. (#7051 )
3
+
1
4
# 7.1.0
2
5
- [ Fixed] Remove explicit MobileCoreServices library linkage from podspec. (#6850 )
3
6
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ - (void)enqueue {
61
61
62
62
fetcher.comment = @" DeleteTask" ;
63
63
64
- #pragma clang diagnostic push
65
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
66
64
strongSelf->_fetcherCompletion = ^(NSData *_Nullable data, NSError *_Nullable error) {
67
65
if (!self.error ) {
68
66
self.error = [FIRStorageErrors errorWithServerError: error reference: self .reference];
@@ -72,10 +70,12 @@ - (void)enqueue {
72
70
}
73
71
self->_fetcherCompletion = nil ;
74
72
};
75
- #pragma clang diangostic pop
76
73
77
74
[fetcher beginFetchWithCompletionHandler: ^(NSData *_Nullable data, NSError *_Nullable error) {
78
- weakSelf.fetcherCompletion (data, error);
75
+ FIRStorageDeleteTask *strongSelf = weakSelf;
76
+ if (strongSelf.fetcherCompletion ) {
77
+ strongSelf.fetcherCompletion (data, error);
78
+ }
79
79
}];
80
80
}];
81
81
}
Original file line number Diff line number Diff line change @@ -109,9 +109,6 @@ - (void)enqueueWithData:(nullable NSData *)resumeData {
109
109
}
110
110
111
111
strongSelf->_fetcher = fetcher;
112
-
113
- #pragma clang diagnostic push
114
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
115
112
strongSelf->_fetcherCompletion = ^(NSData *data, NSError *error) {
116
113
// Fire last progress updates
117
114
[self fireHandlersForStatus: FIRStorageTaskStatusProgress snapshot: self .snapshot];
@@ -137,11 +134,13 @@ - (void)enqueueWithData:(nullable NSData *)resumeData {
137
134
[self removeAllObservers ];
138
135
self->_fetcherCompletion = nil ;
139
136
};
140
- #pragma clang diagnostic pop
141
137
142
138
strongSelf.state = FIRStorageTaskStateRunning;
143
139
[strongSelf.fetcher beginFetchWithCompletionHandler: ^(NSData *data, NSError *error) {
144
- weakSelf.fetcherCompletion (data, error);
140
+ FIRStorageDownloadTask *strongSelf = weakSelf;
141
+ if (strongSelf.fetcherCompletion ) {
142
+ strongSelf.fetcherCompletion (data, error);
143
+ }
145
144
}];
146
145
}];
147
146
}
Original file line number Diff line number Diff line change @@ -88,8 +88,6 @@ - (void)enqueue {
88
88
strongSelf->_fetcher = fetcher;
89
89
fetcher.comment = @" GetDownloadURLTask" ;
90
90
91
- #pragma clang diagnostic push
92
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
93
91
strongSelf->_fetcherCompletion = ^(NSData *data, NSError *error) {
94
92
NSURL *downloadURL;
95
93
if (error) {
@@ -116,9 +114,11 @@ - (void)enqueue {
116
114
117
115
self->_fetcherCompletion = nil ;
118
116
};
119
- #pragma clang diagnostic pop
120
117
[fetcher beginFetchWithCompletionHandler: ^(NSData *data, NSError *error) {
121
- weakSelf.fetcherCompletion (data, error);
118
+ FIRStorageGetDownloadURLTask *strongSelf = weakSelf;
119
+ if (strongSelf.fetcherCompletion ) {
120
+ strongSelf.fetcherCompletion (data, error);
121
+ }
122
122
}];
123
123
}];
124
124
};
Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ - (void)enqueue {
64
64
strongSelf->_fetcher = fetcher;
65
65
fetcher.comment = @" GetMetadataTask" ;
66
66
67
- #pragma clang diagnostic push
68
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
69
67
strongSelf->_fetcherCompletion = ^(NSData *data, NSError *error) {
70
68
FIRStorageMetadata *metadata;
71
69
if (error) {
@@ -87,10 +85,12 @@ - (void)enqueue {
87
85
}
88
86
self->_fetcherCompletion = nil ;
89
87
};
90
- #pragma clang diagnostic pop
91
88
92
89
[fetcher beginFetchWithCompletionHandler: ^(NSData *data, NSError *error) {
93
- weakSelf.fetcherCompletion (data, error);
90
+ FIRStorageGetMetadataTask *strongSelf = weakSelf;
91
+ if (strongSelf.fetcherCompletion ) {
92
+ strongSelf.fetcherCompletion (data, error);
93
+ }
94
94
}];
95
95
}];
96
96
}
Original file line number Diff line number Diff line change @@ -93,8 +93,6 @@ - (void)enqueue {
93
93
strongSelf->_fetcher = fetcher;
94
94
fetcher.comment = @" ListTask" ;
95
95
96
- #pragma clang diagnostic push
97
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
98
96
strongSelf->_fetcherCompletion = ^(NSData *data, NSError *error) {
99
97
FIRStorageListResult *listResult;
100
98
if (error) {
@@ -116,10 +114,12 @@ - (void)enqueue {
116
114
// Remove retain cycle set up by `strongSelf->_fetcherCompletion`
117
115
self->_fetcherCompletion = nil ;
118
116
};
119
- #pragma clang diagnostic pop
120
117
121
118
[fetcher beginFetchWithCompletionHandler: ^(NSData *data, NSError *error) {
122
- weakSelf.fetcherCompletion (data, error);
119
+ FIRStorageListTask *strongSelf = weakSelf;
120
+ if (strongSelf.fetcherCompletion ) {
121
+ strongSelf.fetcherCompletion (data, error);
122
+ }
123
123
}];
124
124
}];
125
125
}
Original file line number Diff line number Diff line change @@ -71,8 +71,6 @@ - (void)enqueue {
71
71
GTMSessionFetcher *fetcher = [strongSelf.fetcherService fetcherWithRequest: request];
72
72
strongSelf->_fetcher = fetcher;
73
73
74
- #pragma clang diagnostic push
75
- #pragma clang diagnostic ignored "-Warc-retain-cycles"
76
74
strongSelf->_fetcherCompletion = ^(NSData *data, NSError *error) {
77
75
FIRStorageMetadata *metadata;
78
76
if (error) {
@@ -94,12 +92,14 @@ - (void)enqueue {
94
92
}
95
93
self->_fetcherCompletion = nil ;
96
94
};
97
- #pragma clang diagnostic pop
98
95
99
96
fetcher.comment = @" UpdateMetadataTask" ;
100
97
101
98
[fetcher beginFetchWithCompletionHandler: ^(NSData *data, NSError *error) {
102
- weakSelf.fetcherCompletion (data, error);
99
+ FIRStorageUpdateMetadataTask *strongSelf = weakSelf;
100
+ if (strongSelf.fetcherCompletion ) {
101
+ strongSelf.fetcherCompletion (data, error);
102
+ }
103
103
}];
104
104
}];
105
105
}
Original file line number Diff line number Diff line change @@ -178,8 +178,9 @@ - (void)enqueue {
178
178
179
179
[strongSelf->_uploadFetcher
180
180
beginFetchWithCompletionHandler: ^(NSData *_Nullable data, NSError *_Nullable error) {
181
- if (weakSelf.fetcherCompletion != nil ) {
182
- weakSelf.fetcherCompletion (data, error);
181
+ FIRStorageUploadTask *strongSelf = weakSelf;
182
+ if (strongSelf.fetcherCompletion ) {
183
+ strongSelf.fetcherCompletion (data, error);
183
184
}
184
185
}];
185
186
}];
You can’t perform that action at this time.
0 commit comments