Hi guys,
I work on NativeScript project and my team uses V8 to access Android APIs
from JavaScript. In order to orchestrate V8/Dalvik garbage collectors dance
I need to know whether a function creates a closure over an object. For
example:
var x = {
f: function () { }
}
var y = {
g: function () {
x.f()
}
}
In the example about I have weak callbacks (WeakCallbackData<T,
P>::Callback) for both x and y object and during GC I need to know whether
object x is reachable from object y. My current approach is built around
v8::internal::ScopeInfo and v8::internal::Context::Lookup which played well
until recently when we start observing app crashes mostly when we try to
access the objects which we concluded belong to a closure.
So far my approach is flawed and I am wondering is there a recommended way
that I can use during GC so I can detect whether object x is reachable from
object y. Any ideas are appreciated.
TIA,
Mihail
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.