mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
a1091772ec
commit
fd778b4240
4 changed files with 154 additions and 20 deletions
|
@ -826,7 +826,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
|||
rooted!(in(cx) let globalObj = CurrentGlobalOrNull(cx));
|
||||
let promiseGlobal = global_root_from_object_maybe_wrapped(globalObj.handle().get());
|
||||
|
||||
let mut valueToResolve = RootedValue::new(cx, $${val}.get());
|
||||
rooted!(in(cx) let mut valueToResolve = $${val}.get());
|
||||
if !JS_WrapValue(cx, valueToResolve.handle_mut()) {
|
||||
$*{exceptionCode}
|
||||
}
|
||||
|
@ -5482,6 +5482,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
|
|||
'js::jsapi::JS_SetProperty',
|
||||
'js::jsapi::JS_SetReservedSlot',
|
||||
'js::jsapi::JS_SplicePrototype',
|
||||
'js::jsapi::JS_WrapValue',
|
||||
'js::jsapi::MutableHandle',
|
||||
'js::jsapi::MutableHandleObject',
|
||||
'js::jsapi::MutableHandleValue',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue