Closed Bug 1526886 Opened 9 months ago Closed 5 months ago

Convert evaluateJSAsync from promise to async

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: yulia, Assigned: nchevobbe)

References

Details

(Whiteboard: dt-fission)

Attachments

(2 files)

No description provided.
Assignee: ystartsev → nchevobbe
Status: NEW → ASSIGNED

We take this as an opportunity to clean-up the function that
waits for the evaluation result.
This change was causing an issue in main.js _queueResponse.
Previously, since evaluateJsAsync wasn't returning anything,
_queueResponse wouldn't be called (See https://searchfox.org/mozilla-central/rev/928742d3ea30e0eb4a8622d260041564d81a8468/devtools/server/main.js#1305-1308).
But now ret isn't falsy (the async function always return a
Promise), which means we ended up trying to send a response.
To fix this, we simply check if the response isn't falsy, or we
bail out.

Depends on D35984

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3699ddf4571
Fix nits in main.js error messages. r=yulia.
https://hg.mozilla.org/integration/autoland/rev/771df5f576da
Convert evaluateJsAsync from Promise to an async function. r=yulia.
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.