mirror of
https://github.com/servo/servo
synced 2026-05-01 20:07:22 +02: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:
committed by
Josh Matthews
parent
a1091772ec
commit
fd778b4240
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user