)]}'
{
  "commit": "2644349b51ba93a56bd98ea02869e4fda3e5c2e2",
  "tree": "e5fdd3fe319bd106f18da9b9c940f3d45007514e",
  "parents": [
    "438aab41922afbae3e4bbe8e2908ce974bb493a0"
  ],
  "author": {
    "name": "Eva Su",
    "email": "evasu@chromium.org",
    "time": "Tue Oct 27 18:02:31 2026"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 27 18:12:52 2026"
  },
  "message": "Reland \"[Extensions] Implement runtime.getDocumentId() API\"\n\nThis is a reland of commit 28732282004a00c63d4642d84713c347cba46002\n\nWhat changed in the reland:\n- The pre-existing UAF in NavPrefetchBrowserTest (where\n  rfhi.GetDocumentToken() was called after a cross-document navigation\n  had already destroyed rfhi when BackForwardCache is disabled) was\n  fixed separately in crrev.com/c/8616829.\n- Added \"nodoc\": true to runtime.getDocumentId in runtime.json and moved\n  the document_id_ assignment into the ExtensionDocumentUserData\n  constructor body after the lifecycle CHECK.\n\nOriginal change\u0027s description:\n\u003e [Extensions] Implement runtime.getDocumentId() API\n\u003e\n\u003e This CL implements the synchronous chrome.runtime.getDocumentId()\n\u003e extension API which allows extension contexts and content scripts to\n\u003e synchronously retrieve the unique document ID of a given WindowProxy or\n\u003e frame owner element (iframe, frame, embed, or object), and throws a\n\u003e synchronous error if the target is invalid or detached.\n\u003e\n\u003e To support synchronous renderer-side execution, this CL:\n\u003e - Flag-guards this API logic behind a kApiRuntimeGetDocumentId flag\n\u003e - Exposes content::RenderFrameHost::GetDocumentToken() and unifies\n\u003e ExtensionApiFrameIdMap. Previously,\n\u003e ExtensionApiFrameIdMap::ExtensionDocumentUserData created a separate\n\u003e random base::UnguessableToken in the browser process that the renderer\n\u003e had no knowledge of. Now, we stop generating a separate document ID in\n\u003e the browser process and instead just use the existing document token in\n\u003e the renderer which ensures the ID will be returned synchronously.\n\u003e - Adds blink::WebFrame::FromWindow(): Blink already resolves DOM frame owner elements to a WebFrame*, but it lacked a helper to resolve a V8 Window / WindowProxy value to its corresponding WebFrame*.\n\u003e - Implements runtime.getDocumentId() in RuntimeHooksDelegate: The\n\u003e schema definition and feature rules are added and\n\u003e RuntimeHooksDelegate::HandleGetDocumentId() is implemented.\n\u003e\n\u003e Cross-origin same-process frames are supported in this CL, but\n\u003e out-of-process frames are not supported yet. This will be done in a\n\u003e separate CL.\n\u003e\n\u003e Fixed: 573738380\n\u003e Fuchsia-Binary-Size: Size increase is unavoidable.\n\u003e Change-Id: I9e6adf456344c2626e4b26c23ee31a08981b8ea2\n\u003e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8543050\n\u003e Reviewed-by: Scott Haseley \u003cshaseley@chromium.org\u003e\n\u003e Reviewed-by: Alex Moshchuk \u003calexmos@chromium.org\u003e\n\u003e Reviewed-by: Tim \u003ctjudkins@chromium.org\u003e\n\u003e Commit-Queue: Eva Su \u003cevasu@chromium.org\u003e\n\u003e Cr-Commit-Position: refs/heads/main@{#1723222}\n\nCq-Include-Trybots: luci.chromium.try:android-bfcache-rel,linux-bfcache-rel\nFixed: 573738380\nFuchsia-Binary-Size: Size increase is unavoidable.\nChange-Id: I7c170dde5cbf93566327e80fe8b6f3f61c339618\nReviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8614081\nCommit-Queue: Eva Su \u003cevasu@chromium.org\u003e\nReviewed-by: Alex Moshchuk \u003calexmos@chromium.org\u003e\nReviewed-by: Justin Lulejian \u003cjlulejian@chromium.org\u003e\nReviewed-by: Scott Haseley \u003cshaseley@chromium.org\u003e\nReviewed-by: Andrea Orru \u003candreaorru@chromium.org\u003e\nReviewed-by: James Cook \u003cjamescook@chromium.org\u003e\nCr-Commit-Position: refs/heads/main@{#1728316}\nNOKEYCHECK\u003dTrue\nGitOrigin-RevId: 23d5301c11ac620a5e978e0daa06ace7aa8dd6e7\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2663eca974560c625daedcff872d14a5e25d298d",
      "old_mode": 33188,
      "old_path": "runtime.js",
      "new_id": "38689302a4abc3b7f72893a0d05e42b11c9caa51",
      "new_mode": 33188,
      "new_path": "runtime.js"
    }
  ]
}
