On 09-01-2014 06:34, Gu, Cheng wrote:
Hi,
As I am implementing 1 to 1 mapping from JS object to native object
(like BindingObject) in external extensions I found it necessary to
track JavaScript object destruction. Fortunately, I have found usage of
lifecycleTracker in internal extension code and tested that it still
useable via requireNative(‘v8tools’).
My question is that whether it proper to use lifecycleTracker in
external extension. Is it correct to create it, set its destructor
property, and define a property in the target object to be reference to
the lifecycleTracker, just like registerLifecycleTracker() did?
It is fine to just create it and use as a property. The reason why the
internal extension's BindingObject has the "registerLifecycleTracker()"
is merely for convenience.
If you have any questions about the registerLifecycleTracker() usage,
let me know.
_______________________________________________
Crosswalk-dev mailing list
Crosswalk-dev@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev