Enqueue promise jobs from SpiderMonkey callbacks, and execute them in batches. Implement native Promise APIs.

Add SpiderMonkey hooks for enqueuing promise jobs. Start porting various native Promise APIs.
This commit is contained in:
Mátyás Mustoha 2016-07-20 12:47:55 +02:00 committed by Josh Matthews
parent a1091772ec
commit fd778b4240
4 changed files with 154 additions and 20 deletions

View file

@ -5,7 +5,12 @@
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
[NoInterfaceObject]
callback PromiseJobCallback = void();
[TreatNonCallableAsNull]
callback AnyCallback = any (any value);
[NoInterfaceObject, Exposed=(Window,Worker)]
// Need to escape "Promise" so it's treated as an identifier.
interface _Promise {
};