Closed Bug 1530554 Opened 9 months ago Closed 9 months ago

Evaluating expressions no longer works in worker threads

Categories

(DevTools :: Debugger, defect)

defect
Not set

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: bhackett, Assigned: yulia)

References

Details

Attachments

(2 files)

Attached patch mochitest patchSplinter Review

I think bug 1485664 broke the ability to evaluate expressions in workers. The debugger uses the console's evaluateJSAsync request for this. Before these patches, each worker was associated with its own console actor which could evaluate expressions in that worker's thread, but after the patch in https://phabricator.services.mozilla.com/D20150 each worker is associated with the same console actor which the main thread uses.

Unfortunately there was no test for this functionality (mea culpa, windowless workers are pretty new and the tests are in poor shape). I've attached a patch which updates a mochitest to exercise this. This test passes before these patches, and fails afterwards.

I'm not sure how to go about fixing this. Is there still a separate console actor associated with each thread? From the changes in D20150 it seems like there isn't, but it's hard for me to follow the changes that are happening in this bug.

Flags: needinfo?(ystartsev)
Flags: needinfo?(poirot.alex)

Hi Brian,

Thanks for the patch, the issue is here: https://searchfox.org/mozilla-central/source/devtools/client/debugger/new/src/client/firefox/workers.js#40

it should be workerTargetFront.getFront("console") instead of tabTarget.getFront("console")

I am currently in a workshop but I can correct it when i have some free minutes

Flags: needinfo?(ystartsev)

I have a patch that addresses the test case.

Flags: needinfo?(poirot.alex)
Assignee: nobody → ystartsev
Pushed by ystartsev@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d30c0a23b53
Fix expression evaluation in worker threads; r=bhackett
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.