To detect persistence, couldn't you just add a member in the base class which returns an identifier and override that in the child class? For example, the base class might return an empty string when getClassType() is called, where a Persistent would return "Persistent" with the same function call. Naturally, these values would be set in the constructors and would not be public. If there's no concern for additional handles in the future, it could even be isBase() which returns a boolean.
--Adam On Tue, Oct 21, 2008 at 10:07 PM, Christian Plesner Hansen < [EMAIL PROTECTED]> wrote: > > > in a debug build, assert it's been passed a persistent handle > > We wanted to add this but haven't been able to come up with a good > model for checking whether a handle is persistent or not. All we see > at the point where the cast takes place is a single pointer value and > there is currently no way to know whether that pointer comes from a > handle scope or a persistent handle. > > > declare it 'explicit' to make it less likely to be used by accident > > It already is. > > > add a comment explaining the situation > > Yes, I'll do that. > > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
