<div dir="ltr"><div>I mostly use tasks when writing tests, so I mostly have questions about how it's use in that situation will be affected.<br></div><div><br>Can we pass async functions everywhere where we use `add_task` in tests already? If we can't, is there a tracking bug for converting all of the test systems to support it?<br>Can you `await` a function created with Task.async such as `BrowserTestUtils.withNewTab` during the transition period?<br></div><div>How about in ESR52? Will uplifting tests to ESR52 be a painful experience due to having to use different tools to write the tests?<br></div><div>Can I pass an async function as the callback argument to things like ContentTask.spawn and BrowserTestUtils.withNewTab? How about on ESR52?<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 16, 2017 at 7:18 PM, J. Ryan Stinnett <span dir="ltr"><<a href="mailto:jryans@gmail.com" target="_blank">jryans@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sounds like a good change to make from the discussion so far.<br>
<br>
If there are issues with stack traces, I would assume having more of our<br>
code base using async / await is a good way to apply pressure for stack<br>
trace improvements (if needed) that will benefit everyone.<br>
<br>
- Ryan<br>
<br>
On Thu, Mar 16, 2017 at 5:52 PM, Kris Maglione <<a href="mailto:kmaglione@mozilla.com">kmaglione@mozilla.com</a>><br>
<div class="HOEnZb"><div class="h5">wrote:<br>
<br>
> On Thu, Mar 16, 2017 at 05:39:06PM -0500, J. Ryan Stinnett wrote:<br>
><br>
>> For modules that have already converted, is there any performance change<br>
>> (good or bad) between async / await vs. Task?<br>
>><br>
><br>
> I haven't noticed any differences either way, but I also haven't done any<br>
> explicit profiling. There's definitely a difference in the way we collect<br>
> async stacks in async/await code vs. with the Promise.jsm promises that<br>
> Task.jsm uses, but that shouldn't show up much on release.<br>
><br>
><br>
> On Thu, Mar 16, 2017 at 5:33 PM, Kris Maglione <<a href="mailto:kmaglione@mozilla.com">kmaglione@mozilla.com</a>><br>
>> wrote:<br>
>><br>
>> On Thu, Mar 16, 2017 at 03:29:15PM -0700, Dave Townsend wrote:<br>
>>><br>
>>> Writing code in standard JS is always better for the web, makes it easier<br>
>>>> to onboard new engineers and allows for better support in developer<br>
>>>> tools.<br>
>>>> So I'd like to propose that we switch to the standard way of writing<br>
>>>> these<br>
>>>> functions immediately. New code should use async/await instead of<br>
>>>> Task.jsm<br>
>>>> going forwards.<br>
>>>><br>
>>>><br>
>>> +1<br>
>>><br>
>>> I've already started doing this in places where using Task.jsm was<br>
>>> unwieldy, and it's improved things tremendously.<br>
>>><br>
>><br>
______________________________<wbr>_________________<br>
dev-platform mailing list<br>
<a href="mailto:dev-platform@lists.mozilla.org">dev-platform@lists.mozilla.org</a><br>
<a href="https://lists.mozilla.org/listinfo/dev-platform" rel="noreferrer" target="_blank">https://lists.mozilla.org/<wbr>listinfo/dev-platform</a><br>
</div></div></blockquote></div><br></div>