For reasions which are unclear, MSVC does not recognize the declaration and
definition of ThenWithCycleCollectedArts as matching in their previous form.
Changing both to use the same template `using` declaration for the entire
return type fixes this.
MSVC also has problems with the previous use of std::forward, which is fixed
by explicitly coercing smart pointers to their equivalent pointer types, and
moving any other type.
Differential Revision: https://phabricator.services.mozilla.com/D4397
--HG--
extra : rebase_source : 483fc7c33a0b10227b11862d176299813466ac95
This makes it easier to add promise handlers from C++ in a manner similar to
JavaScript.
Differential Revision: https://phabricator.services.mozilla.com/D3692
--HG--
extra : rebase_source : efa6735da4b22677b684ae790aede6aac6bb1bad