mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Implement promise bindings This implements support for using Promises in WebIDL, executing promise callbacks in batches (equivalent to running all enqueued jobs from a setTimeout(0)), and attaching native callbacks to promise objects. This is the combined work of myself, @dati91, and @mmatyas based on the following prior work in Gecko: * Codegen.py * Promise.webidl * Promise.cpp/Promise.h * PromiseNativeHandler.h This does not implement microtasks per #4283. This allows us to make progress on testing code that requires the use of Promises right now; the microtasks work is more complicated, but also largely orthogonal to implement. Requires https://github.com/servo/mozjs/pull/89, https://github.com/servo/rust-mozjs/pull/287, and https://github.com/servo/rust-mozjs/pull/294. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #4282 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12830) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
docs | ||
dom | ||
parse | ||
task_source | ||
bluetooth_blacklist.rs | ||
build.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
CMakeLists.txt | ||
devtools.rs | ||
document_loader.rs | ||
layout_wrapper.rs | ||
lib.rs | ||
mem.rs | ||
network_listener.rs | ||
origin.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
serviceworker_manager.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |