)]}'
{
  "commit": "165a6a29ed4c19c03caa2302a3561c973666ef98",
  "tree": "feb6ff08b09fbade0f794763830b7aa248fcfc14",
  "parents": [
    "de177df56d2361fe6356b1f5ecb44936b5a86dd3"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Wed Jul 22 21:40:09 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 22 21:40:09 2026 +0000"
  },
  "message": "[iOS] Mark DisplayLinkManager.shared and init() @MainActor (#189815)\n\nNow that DisplayLinkManager is injected in nearly all use-cases and the\n`.shared` singleton is used at exactly 3 remaining call-sites, marks\n`.shared` and `init()` as `@MainActor` now that it\u0027s safe to do so.\n\n`DisplayLinkManager.init()` has always required betin called on the main\nthread since it reads `UIScreen.main`/`Bundle.main`, but that was only\nenforced by a runtime assert. which compiles out in most release\nconfigruations. The Swift compiler can now enforce a static, checkable\ncontract instead. Actor-isolation checking is enforced in Swift 5.5+\nregardless of strict-concurrency level or language mode, so this takes\nshould take effect immediately given our current Swift 5 language\nmode/default concurrency checking not gated behind a migration.\n\nI\u0027ve left the manual `assert(Thread.isMainThread, ...)` in place for now\ngiven the existing Obj-C use in `FlutterViewController` and\n`FlutterMetalLayer`. If we do eventually remove it, we should ensure\nthat the runtime itself is enforcing this runtime behaviour first --\nthis is dependent on SDK version.\n\nI\u0027ve also left the internal testing initializer non-isolated: it doesn\u0027t\ntouch `UIScreen`/`Bundle.main`, so it has no main-thread requirement,\nand leaving it alone keeps the two tests that use it compiling\nunchanged.\n\n`DisplayLinkManagerTest.swift`\u0027s `testSharedInstanceReturnsAValidValue`\nand `testDisplayConfigurationNotificationsAreHandledWithoutCrashing`\nboth call `.shared` directly, so we needed to mark the test class\n`@MainActor`. XCTest already runs these on the main thread, so this is a\nno-op but makes the compiler (which doesn\u0027t know about XCTest\u0027s\nimplementation) happy.\n\nNo semantic changes to tests because there\u0027s no semantic change to the\nlogic, and this is enforced by the complier itself.\n\nIssue: https://github.com/flutter/flutter/issues/175879\nIssue: https://github.com/flutter/flutter/issues/181684\n\n\n## Pre-launch Checklist\n\n- [X] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [X] I read the [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\n- [X] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [X] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [X] I signed the [CLA].\n- [X] I listed at least one issue that this PR fixes in the description\nabove.\n- [X] I updated/added relevant documentation (doc comments with `///`).\n- [X] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [X] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [X] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\nIf this change needs to override an active code freeze, provide a\ncomment explaining why. The code freeze workflow can be overridden by\ncode reviewers. See pinned issues for any active code freezes with\nguidance.\n\n**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[AI contribution guidelines]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "afafd5e63ea8334088905b5a71e893b745a3bc61",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/DisplayLinkManager.swift",
      "new_id": "15d8e484e35ee334b178a3814da63aba80bc1133",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/DisplayLinkManager.swift"
    },
    {
      "type": "modify",
      "old_id": "ad12b260b56df4557fc294c879d321f08c71e40e",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/DisplayLinkManagerTest.swift",
      "new_id": "4f693b0b52ac89e7c62bf34d8a92e9841cd64f66",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/DisplayLinkManagerTest.swift"
    }
  ]
}
