Module script_runtime

Source
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.
IntroductionType πŸ”’
introductionType values in SpiderMonkey TransitiveCompileOptions.
JSContext πŸ”’
JSEngineSetup
Runnable πŸ”’
Runtime πŸ”’
StreamConsumer πŸ”’
ThreadSafeJSContext πŸ”’
A version of the JSContext that can be used from other threads and is thus Send and Sync. 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Β§

ScriptThreadEventCategory πŸ”’

ConstantsΒ§

GC_CYCLE_START πŸ”’
GC_SLICE_START πŸ”’
HOST_DEFINED_DATA_SLOTS πŸ”’
INCUMBENT_SETTING_SLOT πŸ”’
MALLOC_SIZE_OF_OPS πŸ”’

StaticsΒ§

HOST_DEFINED_DATA πŸ”’
HOST_DEFINED_DATA_CLASS πŸ”’
JOB_QUEUE_TRAPS πŸ”’
JS_ENGINE πŸ”’
SECURITY_CALLBACKS πŸ”’

TraitsΒ§

JSContextHelper πŸ”’
Extra methods for the JSContext type defined in script_bindings, when the methods are only called by code in the script crate.

FunctionsΒ§

code_for_eval_gets πŸ”’ ⚠
consume_stream πŸ”’ ⚠
Implements the steps to compile webassembly response mentioned here https://webassembly.github.io/spec/web-api/#compile-a-potential-webassembly-response
content_security_policy_allows πŸ”’ ⚠
debug_gc_callback πŸ”’ ⚠
drop_interrupt_queues πŸ”’ ⚠
empty πŸ”’ ⚠
enqueue_promise_job πŸ”’ ⚠
https://searchfox.org/mozilla-central/rev/2a8a30f4c9b918b726891ab9d2d62b76152606f1/xpcom/base/CycleCollectedJSContext.cpp#355 SM callback for promise job resolution. Adds a promise callback to the current global’s microtask queue.
gc_slice_callback πŸ”’ ⚠
get_host_defined_data πŸ”’ ⚠
https://searchfox.org/mozilla-central/rev/2a8a30f4c9b918b726891ab9d2d62b76152606f1/xpcom/base/CycleCollectedJSContext.cpp#316
get_size πŸ”’ ⚠
in_range πŸ”’
notify_about_rejected_promises πŸ”’
https://html.spec.whatwg.org/multipage/#notify-about-rejected-promises
pop_interrupt_queue πŸ”’ ⚠
promise_rejection_tracker πŸ”’ ⚠
https://html.spec.whatwg.org/multipage/#the-hostpromiserejectiontracker-implementation
push_new_interrupt_queue πŸ”’ ⚠
report_stream_error πŸ”’ ⚠
run_jobs πŸ”’ ⚠
safely_convert_null_to_string πŸ”’
servo_build_id πŸ”’ ⚠
set_gc_zeal_options πŸ”’ ⚠
trace_rust_roots πŸ”’ βš