Closed Bug 1340671 Opened 3 years ago Closed 3 years ago
[webext] Fix race in get
Dev Tools Target For Context utility method
59 bytes, text/x-review-board-request
`getDevToolsTargetForContext` returns a promise that is supposed to be resolved once the returned "cloned DevTools target" has been connected. Currently, if a devtools API method that use `getDevToolsTargetForContext` utility method (e.g. `inspectedWindow.eval/reload` and `network.onNavigated`) is called while the cloned target (shared between the devtools API called from the same context) is still connecting, the second call can receive the clonedTarget before it is ready to be used (while it should wait for the `target.makeRemote()` promise to be resolved, http://searchfox.org/mozilla-central/rev/ea31c4b64f34a29415a69fb768f8051495547315/devtools/client/framework/target.js#381). I'm going to attach to this issue a patch to fix the race.
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Iteration: --- → 54.3 - Mar 6
Priority: -- → P1
Whiteboard: [devtools] triaged
Comment on attachment 8838726 [details] Bug 1340671 - [webext] Fix race in getDevToolsTargetForContext utility method. https://reviewboard.mozilla.org/r/113534/#review118888
Attachment #8838726 - Flags: review?(kmaglione+bmo) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/be448fec2032 [webext] Fix race in getDevToolsTargetForContext utility method. r=kmag
You need to log in before you can comment on or make changes to this bug.