On Tue, Aug 27, 2013 at 10:55 PM, Mike Moening <[email protected]> wrote: > Seems the Persistent::MakeWeak has changed. > I can't figure out how to fix it. > > static void JSLogFile_DestructorCallback(Isolate* env, Persistent<Value>* > value, void* pNative); > ... > > obj.MakeWeak(pIsolate, pFile, JSLogFile_DestructorCallback); <---- THIS > LINE FAILS TO COMPILE > > error C2664: 'void v8::Persistent<T>::MakeWeak<RJSLogFile>(v8::Isolate *,P > *,void (__cdecl *)(v8::Isolate *,v8::Persistent<T> *,P *))' : cannot convert > parameter 3 from 'void (__cdecl *)(v8::Isolate *,v8::Persistent<T> *,void > *)' to 'void (__cdecl *)(v8::Isolate *,v8::Persistent<T> *,P *)' > with > [ > T=v8::Object, > P=RJSLogFile > ] > and > [ > T=v8::Value > ] > and > [ > T=v8::Object, > P=RJSLogFile > ] > None of the functions with this name in scope match the target type > > > What am I missing?? > > Thanks!
Your weak callback should probably have this prototype: static void JSLogFile_DestructorCallback(Isolate*, Persistent<Object>*, RJSLogFile*); (Not sure if RJSLogFile* is the right type but the point is that MakeWeak() is now stronger typed than it used to be, it no longer always takes a plain void*.) -- -- 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/groups/opt_out.
