Use SpecialPowers.spawn to run tasks in content processes from tests

6 views
Skip to first unread message

Dave Townsend

unread,
1:58 AM (15 hours ago) 1:58 AM
to dev-platform, Firefox Dev
We currently have two different methods for running tasks in content processes from tests. ContentTask.spawn and SpecialPowers.spawn. SpecialPowers.spawn is the better choice so you should use that going forward. I've just landed patches that migrate most uses of ContentTask.spawn to SpecialPowers.spawn and a lint rule that will give you an error if you attempt to use ContentTask.spawn.

I couldn't easily migrate some cases. The two APIs have slightly different timings and APIs available to the tasks. In many cases, the tests didn't pass locally on my machine, making testing the migration impossible. It would be appreciated if you could look at the tests that weren't migrated and if you own them, handle the migration so we can completely remove ContentTask.spawn.


Reply all
Reply to author
Forward
0 new messages