Closed Bug 1474236 Opened 6 years ago Closed 6 years ago

Remove defer usage in JsTerm.js

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: [boogaloo-mvp])

Attachments

(1 file)

      No description provided.
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [boogaloo-mvp]
Comment on attachment 8990660 [details]
Bug 1474236 - Remove defer usage in JsTerm.js; .

https://reviewboard.mozilla.org/r/255740/#review262448

I am seeing some try failures.

E.g. devtools/client/webconsole/test/mochitest/browser_jsterm_dollar.js fails for me too (Win10)

Honza

::: devtools/client/webconsole/components/JSTerm.js:457
(Diff revision 1)
> -    };
> +      };
>  
> -    const mappedString = await this.hud.owner.getMappedExpression(executeString);
> +      const mappedString = await this.hud.owner.getMappedExpression(executeString);
> -    this.requestEvaluation(mappedString, options).then(onResult, onResult);
> +      const response = await this.requestEvaluation(mappedString, options);
> +      await this._executeResultCallback(response);
> +    } catch (e) {}

Why is the try/catch needed now? No catch logic needed?

Honza
Attachment #8990660 - Flags: review?(odvarko)
Comment on attachment 8990660 [details]
Bug 1474236 - Remove defer usage in JsTerm.js; .

https://reviewboard.mozilla.org/r/255740/#review262482

Looks good to me now.

R+ 

I have just the question from comment #2

> Why is the try/catch needed now? No catch logic needed?

Honza
Attachment #8990660 - Flags: review?(odvarko) → review+
> Why is the try/catch needed now? No catch logic needed?

Before there was this `.then(onResult, onResult)` which I thought could be replace by an empty catch block.
But I realize that might not be the case (because we don't call requestEvaluation if we fail before the call to it).
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/034e4cfc6349
Remove defer usage in JsTerm.js; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/034e4cfc6349
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: