Closed Bug 1681888 Opened 3 years ago Closed 3 years ago

Remove defer usage in devtools/server/startup/worker.js

Categories

(DevTools :: Shared Components, task, P3)

task

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: Honza, Assigned: falgunimst95)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(2 files)

We should use new Promise instead.

Honza

Hello, I am new to contributing to Bugzilla can you assigned me to this issue so that I can learn to fix these bugs and also suggest to me how can Is start working on this bug to fix it.

Done, thanks for helping!

Honza

Assignee: nobody → falgunimst95
Status: NEW → ASSIGNED

Hello Honza, I am a bit confused how can i start working into this bug. I mean do this codes are in any git hub. For help in Mozilla chat channel how can i communicate about any kind of help regarding this bugs fixing issue.

(In reply to Falguni Islam from comment #3)

Hello Honza, I am a bit confused how can i start working into this bug. I mean do this codes are in any git hub. For help in Mozilla chat channel how can i communicate about any kind of help regarding this bugs fixing issue.

See https://firefox-source-docs.mozilla.org/setup/contributing_code.html

Thank you very much, @Tim Nguyen. I had already understood how to setup. Currently, I am studying these bugs to fix them and working on these bugs.

https://searchfox.org/mozilla-central/source/devtools/shared/defer.js shows how defer is implemented in general.

This bug is about rewriting devtools/server/startup/worker.js to not use the defer module.

If the promise property isn't used anywhere else:

  const deferred = defer();
  rpcDeferreds[id] = deferred;
  return deferred.promise;

can just be changed to:

  return new Promise((resolve, reject) => {
    rpcDeferreds[id] = { resolve, reject };
  });

If the promise property is used elsewhere (I'm not sure, but I don't think it is), you can just port the defer.js code inside the worker.js that uses it and adapt the code slightly.

Hopefully that's helpful, please let me know if you've got any questions.

Whiteboard: [lang=js]

Having problem to solve a error of break

Bug 168188 problem to understand the error Nicolas Silva <nsilva@mozilla.com>

Bug 1681888 using my concept to use break Nicolas Silva <nsilva@mozilla.com>

Hello @Tim Nguyen. , actually, this video helps me to submit my patches https://www.youtube.com/watch?v=3e-eaeeIDXk&t=509s but I am a bit confused that how can I land my revisions in Lando as in my Phabricator I did not found any lando. Is Lando important to use?

(In reply to Falguni Islam from comment #8)

Hello @Tim Nguyen. , actually, this video helps me to submit my patches https://www.youtube.com/watch?v=3e-eaeeIDXk&t=509s but I am a bit confused that how can I land my revisions in Lando as in my Phabricator I did not found any lando. Is Lando important to use?

Lando needs special permissions, instead you should use request review and then use the "Check-in needed" tag on Phabricator after approval.

Attachment #9194938 - Attachment description: Bug 16881888 removes defer done and new promises added → Bug 1681888 - Remove defer usage in devtools/server/startup/worker.js
Attachment #9194938 - Attachment description: Bug 1681888 - Remove defer usage in devtools/server/startup/worker.js → Bug 1681888 - [devtools] Remove defer usage in devtools/server/startup/worker.js. r=nchevobbe
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d875215ffaf6
[devtools] Remove defer usage in devtools/server/startup/worker.js. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1691075

Falguni, this bug is already fixed, perhaps you wanted to attach the patch to different bug?

Honza

Flags: needinfo?(falgunimst95)

Hello Honza, Actually I was facing a problem while working on a bug. This file work was also attached in my new work , so I had separate this file and did hg revert , now my problem has been fixed.

Flags: needinfo?(falgunimst95)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: