It doesn't seem to be necessary in this particular case because we reach 
the isolate from the global handle location and I wouldn't expect this to 
change. But IMHO stuff like this should be covered by the Isolate::Scope in 
general. Things can change under-the-hood and suddenly an API function 
starts to require the Isolate::Scope. I've personally had to extend 
Isolate::Scopes in tests already.

Best,
Dominik

On Thursday, December 19, 2024 at 2:54:55 PM UTC+1 Erik Corry wrote:

> Do you have to have entered the isolate to call the destructor of 
> v8::Global?
>
> Here we have 
> https://chromium.googlesource.com/v8/v8.git/+/da4e529cfddb93e7166666c447a94d173e1e682f/test/cctest/test-serialize.cc#548
>  
> a Global that is above the isolate scope, so it gets destroyed after the 
> isolate scope was destroyed, and the isolate was exited.  Is this 
> OK/harmless/bad taste?
>
> We could swap those and add a DCHECK in the Global destructor to ensure 
> there is a current isolate.
>
> -- 
> Erik
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/43b40db8-17a7-4d27-bb72-b8f2624d5d98n%40googlegroups.com.

Reply via email to