mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 860704 - GC: Comment says RawT converts to RootedT r=terrence
--HG-- extra : rebase_source : 2f5388adb27a97ee3762d6cab7ec0591b0f718b3
This commit is contained in:
parent
cd2beb0176
commit
a5b7643b9e
@ -49,7 +49,7 @@
|
|||||||
* dangerous-looking actions cannot trigger a GC: js_malloc, cx->malloc_,
|
* dangerous-looking actions cannot trigger a GC: js_malloc, cx->malloc_,
|
||||||
* rt->malloc_, and friends and JS_ReportOutOfMemory.
|
* rt->malloc_, and friends and JS_ReportOutOfMemory.
|
||||||
*
|
*
|
||||||
* The following family of four classes will exactly root a stack location.
|
* The following family of three classes will exactly root a stack location.
|
||||||
* Incorrect usage of these classes will result in a compile error in almost
|
* Incorrect usage of these classes will result in a compile error in almost
|
||||||
* all cases. Therefore, it is very hard to be incorrectly rooted if you use
|
* all cases. Therefore, it is very hard to be incorrectly rooted if you use
|
||||||
* these classes exclusively. These classes are all templated on the type T of
|
* these classes exclusively. These classes are all templated on the type T of
|
||||||
@ -58,7 +58,7 @@
|
|||||||
* - Rooted<T> declares a variable of type T, whose value is always rooted.
|
* - Rooted<T> declares a variable of type T, whose value is always rooted.
|
||||||
* Rooted<T> may be automatically coerced to a Handle<T>, below. Rooted<T>
|
* Rooted<T> may be automatically coerced to a Handle<T>, below. Rooted<T>
|
||||||
* should be used whenever a local variable's value may be held live across a
|
* should be used whenever a local variable's value may be held live across a
|
||||||
* call which can trigger a GC. This is generally true of
|
* call which can trigger a GC.
|
||||||
*
|
*
|
||||||
* - Handle<T> is a const reference to a Rooted<T>. Functions which take GC
|
* - Handle<T> is a const reference to a Rooted<T>. Functions which take GC
|
||||||
* things or values as arguments and need to root those arguments should
|
* things or values as arguments and need to root those arguments should
|
||||||
@ -90,16 +90,16 @@
|
|||||||
* The following diagram explains the list of supported, implicit type
|
* The following diagram explains the list of supported, implicit type
|
||||||
* conversions between classes of this family:
|
* conversions between classes of this family:
|
||||||
*
|
*
|
||||||
* RawT -----> Rooted<T> ----> Handle<T>
|
* Rooted<T> ----> Handle<T>
|
||||||
* | ^
|
* | ^
|
||||||
* | |
|
* | |
|
||||||
* | |
|
* | |
|
||||||
* +---> MutableHandle<T>
|
* +---> MutableHandle<T>
|
||||||
* (via &)
|
* (via &)
|
||||||
*
|
*
|
||||||
* Currently all of these types implicit conversion to RawT. These are present
|
* Currently, all of these types have an implicit conversion to RawT. These are
|
||||||
* only for the purpose of bootstrapping exact rooting and will be removed in
|
* present only for the purpose of bootstrapping exact rooting and will be
|
||||||
* the future (Bug 817164).
|
* removed in the future (Bug 817164).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
|
Loading…
Reference in New Issue
Block a user