)]}'
{
  "commit": "23cdb23446d26f8b29539287eafd83a0e4d3283d",
  "tree": "2b4d8e0248424a903a466abfd4bec6f36b42b3ea",
  "parents": [
    "15df54d4459b78242d32ae36f9c094a96972bedc"
  ],
  "author": {
    "name": "Domenic Denicola",
    "email": "d@domenic.me",
    "time": "Thu Sep 17 02:35:07 2026"
  },
  "committer": {
    "name": "Domenic Denicola",
    "email": "d@domenic.me",
    "time": "Thu Sep 17 03:24:40 2026"
  },
  "message": "Prevent premature stylesheet completion in script tests\n\nThese tests check that a parser-inserted inline script executes the source captured during preparation, even if its text changes before execution. The CSP variant additionally checks that the source approved by CSP is the source that executes.\n\nTo create a gap between preparation and execution, the tests put a pending stylesheet before the target script and schedule a timer to mutate its text. Previously, the mutation waited 500 ms and the stylesheet response waited one second. Those delays do not start together: speculative loading can request and finish the stylesheet while the parser is still waiting for testharness.js, before the mutation timer is even scheduled. The target script then executes before its text changes, producing a failure unrelated to the behavior under test.\n\nKeep the stylesheet response pending until the mutation callback explicitly releases it. This guarantees that stylesheet completion follows the mutation, regardless of when the stylesheet request starts. Use XHR for the release because Firefox explicitly exempts it from scheduling behind blocking CSS/JS loads; fetch() can instead deadlock this arrangement. Release the response even if the mutation step fails, so document loading can finish.\n\nThis removes the premature-stylesheet-completion race, not every timing assumption. The existing 500 ms timer still assumes the parser has reached and prepared the target script before the mutation runs.\n\nCo-authored-by: codex \u003ccodex@openai.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a6638e02a8d131f2c6bde4a1f5b31c00128cc7c9",
      "new_mode": 33188,
      "new_path": "html/semantics/scripting-1/the-script-element/resources/controlled-stylesheet.py"
    },
    {
      "type": "modify",
      "old_id": "a9911510661ff71260b2822381983d203a9328be",
      "old_mode": 33188,
      "old_path": "html/semantics/scripting-1/the-script-element/script-text-modifications-csp.html",
      "new_id": "ff58a3fa10e5d8fef35af6b47f675e7a61c585db",
      "new_mode": 33188,
      "new_path": "html/semantics/scripting-1/the-script-element/script-text-modifications-csp.html"
    },
    {
      "type": "modify",
      "old_id": "cb54da6995b7fa99e657e76254e567cae0455742",
      "old_mode": 33188,
      "old_path": "html/semantics/scripting-1/the-script-element/script-text-modifications.html",
      "new_id": "e9e62926b2554a77c71a4a2859f7f1ce98d5e240",
      "new_mode": 33188,
      "new_path": "html/semantics/scripting-1/the-script-element/script-text-modifications.html"
    }
  ]
}
