Skip to main content

Module refcounted

Module refcounted 

Source
Expand description

A generic, safe mechanism by which Promise objects can be pinned and transferred between threads (or intra-thread for asynchronous events). See more information in script_bindings::refcounted

Structsยง

LivePromiseReferences ๐Ÿ”’
The set of live, pinned DOM objects that are currently prevented from being garbage collected due to outstanding references.
Trusted ๐Ÿ”’
A safe wrapper around a raw pointer to a DOM object that can be shared among threads for use in asynchronous operations. The underlying DOM object is guaranteed to live at least as long as the last outstanding Trusted<T> instance.
TrustedPromise
A safe wrapper around a DOM Promise object that can be shared among threads for use in asynchronous operations. The underlying DOM object is guaranteed to live at least as long as the last outstanding TrustedPromise instance. These values cannot be cloned, only created from existing Rc<Promise> values.

Constantsยง

LIVE_PROMISE_REFERENCES ๐Ÿ”’

Functionsยง

trace_refcounted_objects ๐Ÿ”’ โš 
A JSTraceDataOp for tracing reflectors held in LIVE_REFERENCES