00:17:02  * ngoyaljoined
00:28:51  <ngoyal>hey guys - just starting to play with v8.. using v8 3.21. With a persistent<Context> how do you actually get to the underlying context if the *() operator is private?
00:56:33  * jmar777quit (Read error: Connection reset by peer)
00:57:05  * jmar777joined
01:00:50  * jmar777_joined
01:02:33  * jmar777quit (Ping timeout: 252 seconds)
01:43:55  * c4miloquit (Remote host closed the connection)
01:44:44  * c4milojoined
01:44:48  * c4miloquit (Remote host closed the connection)
02:33:07  * c4milojoined
02:33:07  * c4miloquit (Remote host closed the connection)
02:34:19  * c4milojoined
02:55:18  * Karinuquit (Ping timeout: 264 seconds)
02:55:59  * Jarvixquit (Quit: Jarvix)
03:01:55  * carifquit (Ping timeout: 260 seconds)
03:26:42  * jmar777_quit (Read error: Connection reset by peer)
03:27:17  * jmar777joined
04:11:55  * nierob_joined
04:12:55  * nierobquit (Remote host closed the connection)
04:15:30  * ngoyalquit (Quit: ngoyal)
04:23:20  * jmar777quit (Remote host closed the connection)
04:52:02  * Karinujoined
05:24:04  * jmar777joined
06:00:48  * C-Manjoined
06:32:02  * jmar777quit (Remote host closed the connection)
07:33:55  * c4miloquit (Remote host closed the connection)
07:34:50  * c4milojoined
07:53:55  * Lethalmanjoined
08:00:59  * c4miloquit (Remote host closed the connection)
08:06:09  * bnoordhuisjoined
08:29:58  * jonaslund_joined
08:31:31  * jonaslundquit (Ping timeout: 256 seconds)
08:31:36  * jonaslund_changed nick to jonaslund
08:53:37  * bnoordhuisquit (Ping timeout: 256 seconds)
09:07:06  * bnoordhuisjoined
09:21:14  * xan_quit (Read error: Operation timed out)
09:21:22  * xan_joined
09:51:25  * bnoordhuisquit (Ping timeout: 256 seconds)
09:54:40  * bnoordhuisjoined
10:17:20  * xan_quit (Quit: leaving)
10:32:39  * bnoordhuisquit (Ping timeout: 260 seconds)
11:00:11  * Lethalmanquit (Ping timeout: 248 seconds)
11:13:00  * Lethalmanjoined
11:25:15  * Jarvixjoined
11:39:18  * bnoordhuisjoined
11:39:57  * Jarvixquit (Quit: Jarvix)
11:41:13  * Jarvixjoined
11:44:19  * Jarvix__joined
11:44:28  * bnoordhuisquit (Ping timeout: 268 seconds)
11:44:37  * Jarvixquit (Read error: Connection reset by peer)
11:44:37  * Jarvix__changed nick to Jarvix
11:48:08  * Jarvixquit (Client Quit)
11:54:19  * Jarvixjoined
11:57:44  * carifjoined
12:25:18  * bnoordhuisjoined
12:58:20  * Jarvixquit (Ping timeout: 245 seconds)
13:19:55  * Jarvix_quit (Ping timeout: 248 seconds)
13:21:47  * Jarvixjoined
13:22:31  * Lethalmanquit (Ping timeout: 268 seconds)
13:34:28  * carifquit (Read error: No route to host)
14:25:10  * bnoordhuisquit (Quit: leaving)
14:34:38  * bnoordhuisjoined
14:38:59  * iamdustanquit (Ping timeout: 268 seconds)
15:18:06  * bnoordhuisquit (Ping timeout: 264 seconds)
15:30:24  * stalledquit (Ping timeout: 260 seconds)
15:38:21  * stalledjoined
15:44:10  * bnoordhuisjoined
15:47:10  * carifjoined
15:48:59  * bnoordhuisquit (Ping timeout: 256 seconds)
15:57:45  * bnoordhuisjoined
16:16:00  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
16:17:30  * bnoordhuisquit (Ping timeout: 264 seconds)
17:23:17  * bnoordhuisjoined
17:26:59  * c4milojoined
18:24:45  <Jarvix>So, how can i make a working subclass of External?
19:23:46  * jmar777joined
19:33:52  * seventhjoined
19:44:25  <bnoordhuis>Jarvix: why would you want to do that?
19:44:52  <bnoordhuis>it's not intended to be subclassed, it's just a dumb container for a pointer to void
19:45:05  <Jarvix>because i need to store an ObjC object and i need to know when v8 will not hold a reference anymore (so i can handle memory management for the ObjC object)
19:45:21  <Jarvix>so, how do i make a subclass of Value or Object?
19:45:26  <bnoordhuis>you don't either :)
19:46:04  <bnoordhuis>if you have some external object or memory that you need to destruct / release, use a weak persistent handle and do cleanup in your weak callback
19:46:14  <Jarvix>Ok, so how can i know when v8 does not contain a reference to my object anymore?
19:46:19  <bnoordhuis>see above :)
19:46:53  <Jarvix>mm, i am talking about an unkown number of objects, is that doable?
19:47:06  <bnoordhuis>sure, with some caveats
19:47:14  <Jarvix>cant have them on stack, that is. must be on heap
19:47:31  <bnoordhuis>you probably don't want to create a million weak handles, that will probably bring v8's gc to a standstill
19:47:46  <bnoordhuis>but a few hundred or even thousands won't hurt
19:48:05  <Jarvix>all i really want is to store an objc object in a js object so i can reference it in my callback handlers. :P
19:48:53  <bnoordhuis>make it External or wrap it in an ObjectTemplate, wrap the external or the object in a Persistent<T>, then call MakeWeak() on the persistent
19:49:18  <bnoordhuis>v8 will call your weak callback when the last reference to the object is gone
19:49:37  <bnoordhuis>not necessarily immediately, of course
19:49:46  <bnoordhuis>possibly even never
19:49:52  <Jarvix>but i do need to know when it is destructued eh :P because i need to store the object with retain count +1 in the js wrapper (or it might be dealloc�d)
19:50:23  <Jarvix>ill try :D
19:50:24  <Jarvix>are you dutch?
19:50:27  <bnoordhuis>yep
19:50:54  <bnoordhuis>it's the surname, isn't it? dead giveaway
19:50:58  <Jarvix>Cool. me too :P
19:50:59  <Jarvix>yeah :P
19:51:07  <bnoordhuis>oh, hallo dan maar :)
19:51:18  <Jarvix>nah, dutch in an english channel is asking for trouble :P
19:51:34  <Jarvix>chatting in dutch is a real pita :P
19:51:37  <Jarvix>but yeah, Hallo!
19:51:41  <bnoordhuis>:)
19:56:00  <Jarvix>I do make an External with the void* of my object. Set the external as data for my fucntion/instance/whateverIneedItFor, then make a Persistent handle for that external. call makeWeak. that has a callback function that will be called on removal. What is the P*parameter one? And can I then just let the persistent drop of the stack?
19:56:50  <bnoordhuis>Jarvix: the parameter is just an extra argument you can use
19:57:00  <bnoordhuis>v8 will pass it on to your weak callback
19:57:04  <Jarvix>awesome
19:57:20  <Jarvix>will try this out in a sec.
19:57:28  <Jarvix>in mean time, another question.
19:57:34  <bnoordhuis>it's okay to let the persistent go out of scope btw
19:57:51  <Jarvix>kthnx
19:59:11  <Jarvix>I made general callbacks for any method/property-{s,g}etter on wrapped ObjC objects. Which is cool. I can always get the wrapped object so that is good. In most cases I can also get the actual accessed method/property.
20:00:02  <Jarvix>However, I�d like to use the Data that is passed in FucntionCallbackInfo
20:00:23  <bnoordhuis>what's stopping you?
20:01:31  <Jarvix>the fact i use SetCallHandler on my parent FunctionTemplate, not on the template-per-class :P
20:01:46  <Jarvix>I made a general ObjC FunctionTemplate
20:02:06  <Jarvix>and data is not settable, only as parameter with New() >.< for whatever reason
20:02:10  <Jarvix>Is there a reason? :o
20:03:29  <bnoordhuis>you mean FunctionTemplate::SetCallHandler()? it takes a data argument as its second parameter
20:03:46  <Jarvix>yeah sorry that one
20:12:38  <Jarvix>How do I get a handle<external> for a persistent<external> again?
20:14:10  <bnoordhuis>Jarvix: Local<External>::New(isolate, persistent)
20:16:00  <Jarvix>got it, had a * too much somewhere :p
20:18:16  <Jarvix>persist.MakeWeak(NULL, ObjCWeakReferenceCallback); void ObjCWealReferenceCallback(Isolate *isolate, Persistent<External, void *> persistent, void *parameter);
20:18:38  <Jarvix>error on the first part, no matching method found. Now I wonder, what part is wrong :P
20:46:01  <Jarvix>bnoordhuis, how could I force a trigger of the callback?
21:01:14  * C-Manquit (Quit: Connection reset by beer)
21:16:24  * bnoordhuisquit (Ping timeout: 252 seconds)
21:23:07  * jmar777quit (Ping timeout: 248 seconds)
21:24:22  * jmar777joined
21:47:20  <Jarvix>Maybe I should make a site that shows the most up to date v8 documentation... by running doxygen on every commit
21:56:56  * jmar777quit (Read error: Connection reset by peer)
21:57:20  * jmar777joined
22:23:12  * bnoordhuisjoined
22:27:56  * bnoordhuisquit (Ping timeout: 256 seconds)
22:38:58  * RT|Chatzillajoined
23:57:24  * jmar777quit (Remote host closed the connection)