)]}'
{
  "commit": "7cab22bef318576993006e01ef5df96a1279ed3c",
  "tree": "5ac2d0d76431dea40a27116282ebf06985d71960",
  "parents": [
    "6496d8fe7301a47189802c537fb16270080cfe93"
  ],
  "author": {
    "name": "Shivanshu",
    "email": "112751483+shivanshu877@users.noreply.github.com",
    "time": "Wed Jul 08 07:56:05 2026 +0530"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 08 02:26:05 2026 +0000"
  },
  "message": "engine: warn on WASM load failure when not crossOriginIsolated (#186252)\n\n## Description\n\nFixes #142822.\n\nWhen a Flutter WASM web app fails to load because the host page isn\u0027t\ncross-origin isolated (no COOP/COEP headers), the underlying WebAssembly\nerrors are obscure and don\u0027t point at the actual problem. Examples users\ncurrently see:\n\n* `ReferenceError: SharedArrayBuffer is not defined`\n* `RuntimeError: WebAssembly.instantiate(): shared memory not enabled`\n* `TypeError: Failed to execute \u0027compileStreaming\u0027 on \u0027WebAssembly\u0027`\n\nThis PR wraps the WASM entrypoint load in `_loadWasmEntrypoint` in a\ntry/catch. On failure, it checks `window.crossOriginIsolated \u003d\u003d\u003d false`.\nWhen that\u0027s the case, it emits a single `console.warn` that:\n\n* Names the two missing HTTP headers (`Cross-Origin-Opener-Policy:\nsame-origin` and `Cross-Origin-Embedder-Policy: require-corp`).\n* Suggests building with the JavaScript compile target instead of\n`dart2wasm` if the developer can\u0027t change the server headers.\n* Links to the canonical [web.dev COOP/COEP\nguide](https://web.dev/articles/coop-coep).\n\nThe original error is re-thrown — the existing failure path is\nunchanged. This is purely additive diagnostic output.\n\n## Tests\n\nNo JS test infrastructure exists for\n`engine/src/flutter/lib/web_ui/flutter_js/`. The change is also\ndiagnostic-only — it doesn\u0027t alter runtime behavior beyond the new\nconsole.warn. Requesting a test exemption.\n\nThis PR replaces #186236 (closed for a clean conversation timeline).\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide].\n- [x] I read the [Tree Hygiene] page.\n- [x] I read and followed the [Flutter Style Guide].\n- [x] I signed the [CLA].\n- [x] All existing tests are passing.\n\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md\n[CLA]: https://cla.developers.google.com/\n\n---------\n\nCo-authored-by: Harry Terkelsen \u003c1961493+harryterkelsen@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9d5f4ebbd919c56ca975832761061e0ec03523b8",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js",
      "new_id": "64bafe3c63b4295017fef842fc495c050d2e03cc",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js"
    },
    {
      "type": "modify",
      "old_id": "f69d6c8d56d4f2dfcaf589b5176b4981cedc7d6c",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/web_ui/flutter_js/src/types.d.ts",
      "new_id": "11c439d4ad2333178a9a2ae7ed467564cf40acac",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/web_ui/flutter_js/src/types.d.ts"
    }
  ]
}
