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
- BOOL validObserverProtocol = [observer conformsToProtocol:@protocol(RCTFrameUpdateObserver)]; // [TODO: GH#774- add protocol check before accessing data
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
  }
@@ -65,6 +65,7 @@ static CVReturn RCTPlatformDisplayLinkCallBack(__unused CVDisplayLinkRef display
65
65
  if (_displayLink != NULL) {
66
66
  CVDisplayLinkStop(_displayLink);
67
67
  CVDisplayLinkRelease(_displayLink);
68
+ _displayLink = NULL;
68
69
  }
69
70
  }
70
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.63.41",
3
+ "version": "0.63.42",
4
4
  "bin": "./cli.js",
5
5
  "description": "[Microsoft Fork] A framework for building native apps using React",
6
6
  "license": "MIT",