Closed Bug 1607923 Opened 4 years ago Closed 4 years ago

Logpoints do not work for workers

Categories

(DevTools :: Debugger, defect, P1)

defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: jlast, Assigned: jlast)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

What were you doing?

STR:

  1. go to http://dbg-workers.glitch.me/
  2. add a logpoint on worker.js:22 in onMessage
  3. click the button

ER: see the log in the console
AR: see the error threadActor._parent._consoleActor is undefined

Priority: -- → P1

I tried this in an earlier nightly (september 2019) and it did not work. I don't think it ever worked.

diff --git a/devtools/server/startup/worker.js b/devtools/server/startup/worker.js
index b53736d7a1734..055f1d8c100de 100644
--- a/devtools/server/startup/worker.js
+++ b/devtools/server/startup/worker.js
@@ -116,6 +116,7 @@ this.addEventListener("message", function(event) {
       const consoleActor = new WebConsoleActor(connection, parent);
       pool.addActor(consoleActor);
+      parent._consoleActor = consoleActor;

This fixes the first half. The second part is an error with messages.arguments not having a map function. I'm not sure what to do with that.

Assignee: nobody → jlaster
Status: NEW → ASSIGNED
Blocks: 1609540
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0e538f767312
Logpoints do not work for workers. r=bhackett,nchevobbe
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e34bbd02f6d
Logpoints do not work for workers. r=bhackett,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
Flags: needinfo?(jlaster)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: