Expand description
The script runtime contains common traits and structs commonly used by the script thread, the dom, and the worker threads.
Structs§
- CanGc 🔒A compile-time marker that there are operations that could trigger a JS garbage collection operation within the current stack frame. It is trivially copyable, so it should be passed as a function argument and reused when calling other functions whenever possible. Since it is only meaningful within the current stack frame, it is impossible to move it to a different thread or into a task that will execute asynchronously.
- Runnable 🔒
- Runtime 🔒
- A version of the
JSContext
that can be used from other threads and is thusSend
andSync
. This should only ever expose operations that are marked as thread-safe by the SpiderMonkey API, ie ones that only atomic fields in JSContext.
Enums§
Constants§
Statics§
Traits§
- Extra methods for the JSContext type defined in script_bindings, when the methods are only called by code in the script crate.
Functions§
- consume_
stream 🔒 ⚠Implements the steps to compile webassembly response mentioned here https://webassembly.github.io/spec/web-api/#compile-a-potential-webassembly-response - empty 🔒 ⚠
- SM callback for promise job resolution. Adds a promise callback to the current global’s microtask queue.
- get_
size 🔒 ⚠ - in_
range 🔒 - servo_
build_ 🔒 ⚠id - trace_
rust_ 🔒 ⚠roots