)]}'
{
  "commit": "752565630d5b8e51590e437da04279320846d0fc",
  "tree": "f4b919c967a33c25a2affd5f71f0c8b4691d392b",
  "parents": [
    "18dda100e2d88520c18e8a950fe9e012953d503c"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Fri Oct 18 11:36:30 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Oct 18 11:36:30 2024 -0700"
  },
  "message": "Revert \"Reland \"iOS: Migrate FlutterEngine to ARC\" (#55937)\" (#55954)\n\nThere are still a couple closures where on engine shutdown, the last\r\nlive reference to FlutterEngine may be on a thread other than the\r\nplatform thread.\r\n\r\nSpecifically, the profiling data capture callback can result in the last\r\nlive reference to a FlutterEngine being on a profiling thread, resulting\r\nin an assertion failure in the destructor of the PlatformViewsController\r\nheld by FlutterEngine, because PlatformViewsController holds a\r\nWeakPtrFactory whose destructor asserts that it be on the platform\r\nthread.\r\n\r\nSee:\r\n\r\nhttps://github.com/flutter/engine/blob/ad9e4fef451a73427285826455db5fbdde502bd7/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm#L511-L515\r\n\r\nBacktrace of such a crash:\r\n```\r\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\r\nMain Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]\r\nPID: 46919, TID: 333147, Thread name: FlutterEngine.166.profiler, Queue name: com.apple.root.default-qos.overcommit, QoS: 0\r\nBacktrace:\r\n4   libios_test_flutter.dylib           0x000000014b658aed -[FlutterTextInputPlugin dealloc] + 27\r\n5   libobjc.A.dylib                     0x00007ff800055228 _ZN11objc_object17sidetable_releaseEbb + 204\r\n6   libios_test_flutter.dylib           0x000000014b63df5a -[FlutterEngine .cxx_destruct] + 135\r\n7   libobjc.A.dylib                     0x00007ff800035766 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83\r\n8   libobjc.A.dylib                     0x00007ff80004ddfc objc_destructInstance + 61\r\n9   CoreFoundation                      0x00007ff8004a286b -[NSObject(NSObject) __dealloc_zombie] + 159\r\n10  libios_test_flutter.dylib           0x000000014b635fea -[FlutterEngine dealloc] + 334\r\n11  libobjc.A.dylib                     0x00007ff800055228 _ZN11objc_object17sidetable_releaseEbb + 204\r\n12  libios_test_flutter.dylib           0x000000014b63eda9 _ZNSt3_fl10__function6__funcIZ30-[FlutterEngine startProfiler]E3$_0NS_9allocatorIS2_EEFN7flutter13ProfileSampleEvEEclEv + 69\r\n13  libios_test_flutter.dylib           0x000000014bcd8eaa _ZNSt3_fl10__function6__funcIZNK7flutter16SamplingProfiler16SampleRepeatedlyEN3fml9TimeDeltaEE3$_0NS_9allocatorIS6_EEFvvEEclEv + 40\r\n14  libios_test_flutter.dylib           0x000000014b868786 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 156\r\n15  libios_test_flutter.dylib           0x000000014b86ecca _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26\r\n16  CoreFoundation                      0x00007ff8003ea4a5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20\r\n17  CoreFoundation                      0x00007ff8003ea032 __CFRunLoopDoTimer + 801\r\n18  CoreFoundation                      0x00007ff8003e97b6 __CFRunLoopDoTimers + 243\r\n19  CoreFoundation                      0x00007ff8003e4028 __CFRunLoopRun + 2108\r\n20  CoreFoundation                      0x00007ff8003e3409 CFRunLoopRunSpecific + 557\r\n21  libios_test_flutter.dylib           0x000000014b86ee07 _ZN3fml17MessageLoopDarwin3RunEv + 65\r\n22  libios_test_flutter.dylib           0x000000014b8686a4 _ZN3fml15MessageLoopImpl5DoRunEv + 22\r\n23  libios_test_flutter.dylib           0x000000014b86dce5 _ZNSt3_fl10__function6__funcIZN3fml6ThreadC1ERKNS_8functionIFvRKNS3_12ThreadConfigEEEES7_E3$_0NS_9allocatorISC_EEFvvEEclEv + 135\r\n24  libios_test_flutter.dylib           0x000000014b86da87 _ZZN3fml12ThreadHandleC1EONSt3_fl8functionIFvvEEEEN3$_08__invokeEPv + 27\r\n25  libsystem_pthread.dylib             0x000000010d6a818b _pthread_start + 99\r\n26  libsystem_pthread.dylib             0x000000010d6a3ae3 thread_start + 15\r\n2024-10-18 09:31:27.549111-0700 IosUnitTests[46919:333147] [reports] Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]\r\nPID: 46919, TID: 333147, Thread name: FlutterEngine.166.profiler, Queue name: com.apple.root.default-qos.overcommit, QoS: 0\r\nBacktrace:\r\n4   libios_test_flutter.dylib           0x000000014b658aed -[FlutterTextInputPlugin dealloc] + 27\r\n5   libobjc.A.dylib                     0x00007ff800055228 _ZN11objc_object17sidetable_releaseEbb + 204\r\n6   libios_test_flutter.dylib           0x000000014b63df5a -[FlutterEngine .cxx_destruct] + 135\r\n7   libobjc.A.dylib                     0x00007ff800035766 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83\r\n8   libobjc.A.dylib                     0x00007ff80004ddfc objc_destructInstance + 61\r\n9   CoreFoundation                      0x00007ff8004a286b -[NSObject(NSObject) __dealloc_zombie] + 159\r\n10  libios_test_flutter.dylib           0x000000014b635fea -[FlutterEngine dealloc] + 334\r\n11  libobjc.A.dylib                     0x00007ff800055228 _ZN11objc_object17sidetable_releaseEbb + 204\r\n12  libios_test_flutter.dylib           0x000000014b63eda9 _ZNSt3_fl10__function6__funcIZ30-[FlutterEngine startProfiler]E3$_0NS_9allocatorIS2_EEFN7flutter13ProfileSampleEvEEclEv + 69\r\n13  libios_test_flutter.dylib           0x000000014bcd8eaa _ZNSt3_fl10__function6__funcIZNK7flutter16SamplingProfiler16SampleRepeatedlyEN3fml9TimeDeltaEE3$_0NS_9allocatorIS6_EEFvvEEclEv + 40\r\n14  libios_test_flutter.dylib           0x000000014b868786 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 156\r\n15  libios_test_flutter.dylib           0x000000014b86ecca _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26\r\n16  CoreFoundation                      0x00007ff8003ea4a5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20\r\n17  CoreFoundation                      0x00007ff8003ea032 __CFRunLoopDoTimer + 801\r\n18  CoreFoundation                      0x00007ff8003e97b6 __CFRunLoopDoTimers + 243\r\n19  CoreFoundation                      0x00007ff8003e4028 __CFRunLoopRun + 2108\r\n20  CoreFoundation                      0x00007ff8003e3409 CFRunLoopRunSpecific + 557\r\n21  libios_test_flutter.dylib           0x000000014b86ee07 _ZN3fml17MessageLoopDarwin3RunEv + 65\r\n22  libios_test_flutter.dylib           0x000000014b8686a4 _ZN3fml15MessageLoopImpl5DoRunEv + 22\r\n23  libios_test_flutter.dylib           0x000000014b86dce5 _ZNSt3_fl10__function6__funcIZN3fml6ThreadC1ERKNS_8functionIFvRKNS3_12ThreadConfigEEEES7_E3$_0NS_9allocatorISC_EEFvvEEclEv + 135\r\n24  libios_test_flutter.dylib           0x000000014b86da87 _ZZN3fml12ThreadHandleC1EONSt3_fl8functionIFvvEEEEN3$_08__invokeEPv + 27\r\n25  libsystem_pthread.dylib             0x000000010d6a818b _pthread_start + 99\r\n26  libsystem_pthread.dylib             0x000000010d6a3ae3 thread_start + 15\r\nIosUnitTests(47009,0x10ec76240) malloc: enabling scribbling to detect mods to free blocks\r\nIosUnitTests(47009) MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null)\r\nIosUnitTests(47009) MallocStackLogging: stack logs being written to /private/tmp/stack-logs.47009.1057b6000.IosUnitTests.0o4HgN.index\r\nIosUnitTests(47009) MallocStackLogging: recording malloc and VM allocation stacks to disk using standard recorder\r\nIosUnitTests(47009) MallocStackLogging: process 46919 no longer exists, stack logs deleted from /tmp/stack-logs.46919.10d1fc000.IosUnitTests.kFionm.index\r\n```\r\n\r\nThis reverts commit 02fc8a455d0c4b70a70d36e7f4329f5ad706596d.\r\n\r\n## Pre-launch Checklist\r\n\r\n- [X] I read the [Contributor Guide] and followed the process outlined\r\nthere for submitting PRs.\r\n- [X] I read the [Tree Hygiene] wiki page, which explains my\r\nresponsibilities.\r\n- [X] I read and followed the [Flutter Style Guide] and the [C++,\r\nObjective-C, Java style guides].\r\n- [X] I listed at least one issue that this PR fixes in the description\r\nabove.\r\n- [X] I added new tests to check the change I am making or feature I am\r\nadding, or the PR is [test-exempt]. See [testing the engine] for\r\ninstructions on writing and running engine tests.\r\n- [X] I updated/added relevant documentation (doc comments with `///`).\r\n- [X] I signed the [CLA].\r\n- [X] All existing and new tests are passing.\r\n\r\nIf you need help, consider asking for advice on the #hackers-new channel\r\non [Discord].\r\n\r\n\u003c!-- Links --\u003e\r\n[Contributor Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#overview\r\n[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene\r\n[test-exempt]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#tests\r\n[Flutter Style Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo\r\n[C++, Objective-C, Java style guides]:\r\nhttps://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style\r\n[testing the engine]:\r\nhttps://github.com/flutter/flutter/wiki/Testing-the-engine\r\n[CLA]: https://cla.developers.google.com/\r\n[flutter/tests]: https://github.com/flutter/tests\r\n[breaking change policy]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes\r\n[Discord]: https://github.com/flutter/flutter/wiki/Chat",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5e197c315828e5569c1068742c96a44704639cf8",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/BUILD.gn",
      "new_id": "6bd0397b26b9f6cf4a9ee1c156af3e13a82cb29f",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "7f08a3898ed0f5208528502ced7e424ce2df445f",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/framework/Source/FlutterEngine.mm",
      "new_id": "713d4fd0e288fbbf27bcdad4edca12f02ee2143e",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/framework/Source/FlutterEngine.mm"
    },
    {
      "type": "modify",
      "old_id": "71f79c2ba42e51b363a853fd328e4011445448f7",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h",
      "new_id": "d3252d27b2ecbd3d4b56802b65eb7cce2bfd34c9",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h"
    },
    {
      "type": "modify",
      "old_id": "c8a0dc6fe421924f4e30f435f4a59d703952ce04",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm",
      "new_id": "283a2731fe884639eca1aa0272dcef3d8829e112",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm"
    },
    {
      "type": "modify",
      "old_id": "b6259e120cced6d88dcb7e0891d71f512c941804",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm",
      "new_id": "38096e9cbf32061bbf0c7f849417dcbf2a9271d9",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm"
    },
    {
      "type": "modify",
      "old_id": "0dede34e2e94a1bb7b6aae0d1d7902fec20fe67a",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm",
      "new_id": "5e71831d7b6828a2987160d0416fe266ebd669c2",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm"
    }
  ]
}
