[gjs: 3/16] docs: Mention JS::TraceEdge()



commit 54ff31d31e9c422ef6b3966b22ba342ed1eb7092
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Sep 5 22:14:48 2018 -0400

    docs: Mention JS::TraceEdge()
    
    The function previously mentioned here no longer exists, and the API that
    replaced it is JS::TraceEdge().

 doc/SpiderMonkey_Memory.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/doc/SpiderMonkey_Memory.md b/doc/SpiderMonkey_Memory.md
index e4d07023..3e30a7c7 100644
--- a/doc/SpiderMonkey_Memory.md
+++ b/doc/SpiderMonkey_Memory.md
@@ -48,7 +48,7 @@ The general rule is that SpiderMonkey has a set of GC roots. To do the garbage c
 So if you have a `JS::Value` or `JSObject*`/`JSString*`/`JSFunction*`/`JS::Symbol*` somewhere that is not 
reachable from one of SpiderMonkey's GC roots - say, declared on the stack or in the private data of an 
object - that will not be found.
 SpiderMonkey may try to finalize this object even though you have a reference to it.
 
-If you reference JavaScript objects from your custom object, you have to use `JS::Heap<T>` and set the 
`JSCLASS_MARK_IS_TRACE` flag in your JSClass, and define a trace function in the class struct. A trace 
function just invokes `JS_CallHeapValueTracer()`, `JS_CallHeapObjectTracer()`, etc. to tell SpiderMonkey 
about any objects you reference. See [JSTraceOp docs][2].
+If you reference JavaScript objects from your custom object, you have to use `JS::Heap<T>` and set the 
`JSCLASS_MARK_IS_TRACE` flag in your JSClass, and define a trace function in the class struct. A trace 
function just invokes `JS::TraceEdge<T>()` to tell SpiderMonkey about any objects you reference. See 
[JSTraceOp docs][2].
 
 Tracing doesn't add a GC thing to the GC root set!
 It just notifies the interpreter that a thing is reachable from another thing.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]