File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
ffigen/test/native_objc_test Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ void main() {
5252 globalObject = NSObject ();
5353 final obj1raw = globalObject! .ref.pointer;
5454
55- // TODO(https://github.com/dart-lang/native/issues/1435): Fix flakiness.
56- // expect(objectRetainCount(obj1raw), greaterThan(0));
55+ expect (objectRetainCount (obj1raw), greaterThan (0 ));
5756
5857 return obj1raw;
5958 }
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ void main() {
5454 lib.globalObject = NSObject ();
5555 final obj1raw = lib.globalObject! .ref.pointer;
5656
57- // TODO(https://github.com/dart-lang/native/issues/1435): Fix flakiness.
58- // expect(objectRetainCount(obj1raw), greaterThan(0));
57+ expect (objectRetainCount (obj1raw), greaterThan (0 ));
5958
6059 return obj1raw;
6160 }
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ int objectRetainCount(Pointer<ObjCObject> object) {
9898 // isValidObject broke due to a runtime update.
9999 // These constants are the ISA_MASK macro defined in runtime/objc-private.h.
100100 const maskX64 = 0x00007ffffffffff8 ;
101- const maskArm = 0x00000001fffffff8 ;
101+ const maskArm = 0x0000000ffffffff8 ;
102102 final mask = Abi .current () == Abi .macosX64 ? maskX64 : maskArm;
103103 final clazz = Pointer <ObjCObject >.fromAddress (header & mask);
104104
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ void main() {
2626 {
2727 final object = NSObject ();
2828 pointer = object.ref.retainAndAutorelease ();
29+ expect (objectRetainCount (pointer), greaterThan (0 ));
2930 }
3031 doGC ();
3132 expect (objectRetainCount (pointer), greaterThan (0 ));
@@ -45,6 +46,7 @@ void main() {
4546 {
4647 final object = NSObject ();
4748 pointer = object.ref.retainAndAutorelease ();
49+ expect (objectRetainCount (pointer), greaterThan (0 ));
4850 }
4951 doGC ();
5052 expect (objectRetainCount (pointer), greaterThan (0 ));
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ int objectRetainCount(Pointer<ObjCObject> object) {
5959 // isValidObject broke due to a runtime update.
6060 // These constants are the ISA_MASK macro defined in runtime/objc-private.h.
6161 const maskX64 = 0x00007ffffffffff8 ;
62- const maskArm = 0x00000001fffffff8 ;
62+ const maskArm = 0x0000000ffffffff8 ;
6363 final mask = Abi .current () == Abi .macosX64 ? maskX64 : maskArm;
6464 final clazz = Pointer <ObjCObject >.fromAddress (header & mask);
6565
You can’t perform that action at this time.
0 commit comments