From 1fe84219f9ea8d7671ded7f7b97c63abc91f8add Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 6 Jul 2026 15:56:41 +0100 Subject: [PATCH] [chrome-devtools-patches] Update Chrome DevTools to M150 (Chrome 150) --- .changeset/chrome-devtools-update-m150.md | 7 ++ packages/chrome-devtools-patches/Makefile | 2 +- ...upport-make-it-work-in-Firefox-Safar.patch | 58 ++++++------ ...etup-Cloudflare-devtools-target-type.patch | 18 ++-- ...ove-connection-stability.-Without-th.patch | 46 +++++----- ...source-files-over-the-network.-This-.patch | 90 ++++++++++--------- ...the-devtools-theme-via-a-query-param.patch | 12 +-- .../0006-All-about-the-network-tab.patch | 47 ++++------ ...Limit-heap-profiling-modes-available.patch | 42 +++++---- ...ame-as-the-title-for-the-Javascript-.patch | 6 +- 10 files changed, 166 insertions(+), 162 deletions(-) create mode 100644 .changeset/chrome-devtools-update-m150.md diff --git a/.changeset/chrome-devtools-update-m150.md b/.changeset/chrome-devtools-update-m150.md new file mode 100644 index 0000000000..362824ee7f --- /dev/null +++ b/.changeset/chrome-devtools-update-m150.md @@ -0,0 +1,7 @@ +--- +"@cloudflare/chrome-devtools-patches": patch +--- + +Update Chrome DevTools to Chrome 150 (M150) + +Updates the Chrome DevTools frontend used by `wrangler dev` and the Workers Playground to the Chrome 150 (M150) release, bringing upstream fixes and improvements while preserving the existing Workers debugging experience. diff --git a/packages/chrome-devtools-patches/Makefile b/packages/chrome-devtools-patches/Makefile index 95d3741940..fb16435844 100644 --- a/packages/chrome-devtools-patches/Makefile +++ b/packages/chrome-devtools-patches/Makefile @@ -1,7 +1,7 @@ ROOT = $(realpath .) PATH_WITH_DEPOT = $(PATH):$(ROOT)/depot/ # The upstream devtools commit upon which our patches are based -HEAD = b66ecf5bef3ae6c769dbc6d904ce1c54d3771227 +HEAD = 1d67dc0dafa344bbd6ca75c124e2d6d9d53074d8 PATCHES = $(shell ls ${PWD}/patches/*.patch) depot: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot diff --git a/packages/chrome-devtools-patches/patches/0001-Expand-Browser-support-make-it-work-in-Firefox-Safar.patch b/packages/chrome-devtools-patches/patches/0001-Expand-Browser-support-make-it-work-in-Firefox-Safar.patch index 14e0ecccbf..f0431f99f1 100644 --- a/packages/chrome-devtools-patches/patches/0001-Expand-Browser-support-make-it-work-in-Firefox-Safar.patch +++ b/packages/chrome-devtools-patches/patches/0001-Expand-Browser-support-make-it-work-in-Firefox-Safar.patch @@ -1,4 +1,4 @@ -From 261ba678389218354cb8f9dce78483cf4f09716f Mon Sep 17 00:00:00 2001 +From 69fdc50c3b8828a0e7cd719e0216993dbd5f624c Mon Sep 17 00:00:00 2001 From: Workers DevProd Date: Fri, 25 Oct 2024 14:15:43 +0100 Subject: [PATCH 1/8] Expand Browser support (make it work in Firefox & Safari) @@ -16,30 +16,17 @@ If updating the commit of devtools upon which these patches are based, make sure * Allows devtools to load in Safari (loading with _any_ UI is sufficent to check whether this has worked) * Supports viewing a list of requests in the network panel in Firefox (without the patches here this goes very obviously wrong) --- - front_end/core/dom_extension/DOMExtension.ts | 2 +- - front_end/entrypoint_template.html | 38 ++++++++++++++++++- + front_end/entrypoint_template.html | 39 ++++++++++++++++++- front_end/entrypoints/js_app/js_app.ts | 3 ++ + front_end/ui/dom_extension/DOMExtension.ts | 2 +- .../legacy/components/data_grid/DataGrid.ts | 5 +++ - 4 files changed, 46 insertions(+), 2 deletions(-) + 4 files changed, 47 insertions(+), 2 deletions(-) -diff --git a/front_end/core/dom_extension/DOMExtension.ts b/front_end/core/dom_extension/DOMExtension.ts -index 202c680a30..a639437998 100644 ---- a/front_end/core/dom_extension/DOMExtension.ts -+++ b/front_end/core/dom_extension/DOMExtension.ts -@@ -133,7 +133,7 @@ Node.prototype.getComponentSelection = function(): Selection|null { - while (parent && parent.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) { - parent = parent.parentNode; - } -- return parent instanceof ShadowRoot ? parent.getSelection() : this.window().getSelection(); -+ return parent instanceof ShadowRoot ? (parent?.getSelection?.() ?? this.window().getSelection()) : this.window().getSelection(); - }; - - Node.prototype.hasSelection = function(): boolean { diff --git a/front_end/entrypoint_template.html b/front_end/entrypoint_template.html -index 64d55d4c14..07972be81f 100644 +index e778aefef2..cdf7049337 100644 --- a/front_end/entrypoint_template.html +++ b/front_end/entrypoint_template.html -@@ -13,9 +13,45 @@ +@@ -13,12 +13,49 @@ background-color: rgb(41 42 45); } } @@ -71,11 +58,15 @@ index 64d55d4c14..07972be81f 100644 + } + + .cm-editor + .cm-editor { -+ display: 'none', ++ display: none; + } -- -+ + ++ 'sha256-AIRkz8wOl/LgmUJduw9AsUnrb94PlBpePfk0Rowm+Vo=' 'self' https://chrome-devtools-frontend.appspot.com; img-src 'self' data: blob:; frame-src * data:; connect-src data: https://chromeuxreport.googleapis.com 'self' devtools: ws://127.0.0.1:*;"> ++ +