Skip to content

Commit a60b98b

Browse files
committed
Update
1 parent fcdc0a0 commit a60b98b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flutter/lib/src/native/cocoa/sentry_native_cocoa.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class SentryNativeCocoa extends SentryNativeChannel {
5858
FutureOr<void> captureEnvelope(
5959
Uint8List envelopeData, bool containsUnhandledException) {
6060
// Use a safe copy-based conversion to avoid double-free issues observed
61-
// when relying on `dataWithBytesNoCopy:length:freeWhenDone:`. Although
62-
// this involves an additional copy, it prevents the EXC_BAD_ACCESS
63-
// crash caused by Cocoa freeing the buffer twice.
61+
// when relying on `dataWithBytesNoCopy:length:freeWhenDone:`.
6462
final length = envelopeData.length;
6563
final ptr = malloc<Uint8>(length);
6664
ptr.asTypedList(length).setAll(0, envelopeData);

flutter/test/sentry_native_channel_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ void main() {
254254
await sut.captureEnvelope(data, false);
255255

256256
expect(captured, data);
257-
});
257+
},
258+
skip:
259+
(Platform().isAndroid || Platform().isIOS || Platform().isMacOS));
258260

259261
test('loadContexts', () async {
260262
when(channel.invokeMethod('loadContexts'))

0 commit comments

Comments
 (0)