Bug 1588007-Add fetch event listener breakpoint for service worker r=loganfsmyth
authorchujun <chujunlu@hotmail.com>
Wed, 13 Nov 2019 22:28:16 +0000
changeset 502370 ffd9d340f30467b02ef2382bde026a573dd4031b
parent 502369 bdca724cf3a248e511fdc87c44f018f6287fa328
child 502371 b168e040a286c97238b3eec0d680298273d1af84
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1588007
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1588007-Add fetch event listener breakpoint for service worker r=loganfsmyth From Harald's comment, it seems there're more events to add, hence making a service worker section. I didn't find a related test in server. Let me know if I miss any! {F1687381} Differential Revision: https://phabricator.services.mozilla.com/D52297
devtools/server/actors/utils/event-breakpoints.js
--- a/devtools/server/actors/utils/event-breakpoints.js
+++ b/devtools/server/actors/utils/event-breakpoints.js
@@ -258,17 +258,23 @@ const AVAILABLE_BREAKPOINTS = [
       generalEvent("touch", "touchstart"),
       generalEvent("touch", "touchmove"),
       generalEvent("touch", "touchend"),
       generalEvent("touch", "touchcancel"),
     ],
   },
   {
     name: "Worker",
-    items: [workerEvent("message"), workerEvent("messageerror")],
+    items: [
+      workerEvent("message"),
+      workerEvent("messageerror"),
+
+      // Service Worker events.
+      globalEvent("serviceworker", "fetch"),
+    ],
   },
   {
     name: "XHR",
     items: [
       xhrEvent("xhr", "readystatechange"),
       xhrEvent("xhr", "load"),
       xhrEvent("xhr", "loadstart"),
       xhrEvent("xhr", "loadend"),