I'm glad to help!

For future reference, if this is indeed the cause of your  
difficulties, then you should be able to see something like the  
following when debugging using v8's debug binary (scons mode=debug,  
result v8_g.lib):

#
# Fatal error in src/handles-inl.h, line 47
# CHECK(reinterpret_cast<Address>(*location_) != kHandleZapValue) failed
#

More interestingly, if you actually debug it, you can see that  
location points to 0xbaddead (kHandleZapValue). I suppose that that's  
what the handle sets its value to when it is cleared.

Alex

On Mar 3, 2009, at 4:55 PM, Stephan Beal wrote:

>
> On Tue, Mar 3, 2009 at 11:40 PM, Alex Iskander <[email protected]>  
> wrote:
>> #define WHPRINTF_RETURN if( zExtra ) free(zExtra); return  
>> ResultString
>> To:
>> #define WHPRINTF_RETURN if( zExtra ) free(zExtra); return
>> sentry.Close(ResultString);
>
> Wow, thanks for taking a look so quickly! (And you got it from the
> source repo, even!)
>
> Aha! i never did remember to close my scopes.
>
>> But if I recall, you don't actually need handle scopes inside  
>> function
>> callbacks (some people mentioned that v8 already had them in these
>> situations, which makes sense), so the point may be moot. Other  
>> than that,
>
> That was my assumption. i've always gotten segfaults with HandleScope,
> but maybe because i wasn't calling Close().
>
>> you are probably handling memory alright; you aren't using persistent
>> handles, and the handle scope is taken care of, so v8-wise, you  
>> shouldn't be
>> leaking.
>
> :-D
>
>> If you don't know what HandleScope::Close() does, I think I cover it
>> in http://create.tpsitulsa.com/wiki/V8/Handles#Escaping_Scope , under
>> "Escaping Scope."
>> Hope that helps,
>
> Very much, indeed. Thank you!
>
> -- 
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
> >

Alex Iskander, TPSi





--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to