On Dec 7, 2013, at 12:15 PM, Alexei Sholik alcosho...@gmail.com wrote:
The garbage collector scans the C stack.
Hm, let me make sure I understand this correctly.
...
I'm asking because I've never previously dealt with a library that scans the
host application's stack. So it sounds pretty
Hi Geoffrey,
Therefore, if I'm not immediately returning the created object, it might
get cleaned up prematurely.
Because the GC scans the stack, and the value you just created is on the
stack, it won’t be garbage collected right away.
What about the case when the creation of an object
At this point, the code is not inside the JS stack, so is it possible for an
object to be collected between the calls to JSObjectMake and
JSObjectCallAsFunction?
The garbage collector scans the C stack.
Geoff
___
webkit-dev mailing list
My question in short: is it necessary to call JSValueProtect right after
object/value creation in C++?
No.
I don't know the semantics of the GC, but I'm assuming that almost any call
to a JSC function that takes a context may run a garbage collection cycle.
Yes.
Therefore, if I'm not
Will JSC scan the current stack which arg1 and arg2 are on?
Yes.
Will it scan the stack even further back?
Yes.
Geoff
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev
Hi,
My question in short: is it necessary to call JSValueProtect right after
object/value creation in C++? I don't know the semantics of the GC, but I'm
assuming that almost any call to a JSC function that takes a context may
run a garbage collection cycle. Therefore, if I'm not immediately
6 matches
Mail list logo