react-native-macos 0.63.41 → 0.63.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -96,6 +96,15 @@
|
|
|
96
96
|
|
|
97
97
|
- (void)invalidate
|
|
98
98
|
{
|
|
99
|
+
// [TODO: GH#858
|
|
100
|
+
// ensure observer callbacks do not hold a reference to weak self via pauseCallback
|
|
101
|
+
for (RCTModuleData *moduleData in _frameUpdateObservers) {
|
|
102
|
+
id<RCTFrameUpdateObserver> observer = (id<RCTFrameUpdateObserver>)moduleData.instance;
|
|
103
|
+
[observer setPauseCallback:nil];
|
|
104
|
+
}
|
|
105
|
+
[_frameUpdateObservers removeAllObjects]; // just to be explicit
|
|
106
|
+
// TODO: GH#858]
|
|
107
|
+
|
|
99
108
|
[_jsDisplayLink invalidate];
|
|
100
109
|
}
|
|
101
110
|
|
|
@@ -146,9 +155,7 @@
|
|
|
146
155
|
BOOL pauseDisplayLink = YES;
|
|
147
156
|
for (RCTModuleData *moduleData in _frameUpdateObservers) {
|
|
148
157
|
id<RCTFrameUpdateObserver> observer = (id<RCTFrameUpdateObserver>)moduleData.instance;
|
|
149
|
-
|
|
150
|
-
RCTAssert(validObserverProtocol, @"Observer does not conform to necessary protocol (RCTFrameUpdateObserver)");
|
|
151
|
-
if (validObserverProtocol && !observer.paused) { // TODO: GH#774- add protocol check before accessing data]
|
|
158
|
+
if (!observer.paused) {
|
|
152
159
|
pauseDisplayLink = NO;
|
|
153
160
|
break;
|
|
154
161
|
}
|