Closed
Bug 1471812
Opened 8 years ago
Closed 8 years ago
Remove defer usage in webconsole panel initialization
Categories
(DevTools :: Console, enhancement, P3)
DevTools
Console
Tracking
(firefox63 fixed)
RESOLVED
FIXED
Firefox 63
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
We should probably be able to switch to an async function for the panel's open function
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P3
| Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8988410 [details]
Bug 1471812 - Remove defer usage in webconsole panel initialization; .
https://reviewboard.mozilla.org/r/253706/#review260280
Thanks for this cleanup!
Looks good to me if try is happy with this change (who know what subtle races promise changes can introduce...)
::: devtools/client/webconsole/panel.js:63
(Diff revision 1)
> + // Wait for the iframe to load if it's not already.
> - if (!this.target.isRemote) {
> + if (!this.target.isRemote) {
> - promiseTarget = this.target.makeRemote();
> + target = await this.target.makeRemote();
> - } else {
> + } else {
> - promiseTarget = promise.resolve(this.target);
> + target = this.target;
> - }
> + }
makeRemote seems to resolve a null value:
https://searchfox.org/mozilla-central/source/devtools/client/framework/target.js#473
So I think this `target variable is useless and we only need:
if (!this.target.isRemote) {
await this.target.makeRemote();
}
::: devtools/client/webconsole/panel.js:65
(Diff revision 1)
> - // 2. Wait for the remote target.
> - // 3. Open the Web Console.
> - return deferredIframe.promise
> - .then(() => promiseTarget)
> - .then((target) => {
> - this._frameWindow._remoteTarget = target;
> + this._frameWindow._remoteTarget = target;
This attribute is no longer used.
Attachment #8988410 -
Flags: review?(poirot.alex) → review+
| Assignee | ||
Comment 3•8 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8988410 [details]
Bug 1471812 - Remove defer usage in webconsole panel initialization; .
https://reviewboard.mozilla.org/r/253706/#review260280
Thanks for the review and for the extra pair of eyes. The code looks even better now.
Will puh again to TRY to see if everything is okay
| Comment hidden (mozreview-request) |
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/319854ead979
Remove defer usage in webconsole panel initialization; r=ochameau.
Comment 6•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in
before you can comment on or make changes to this bug.
Description
•