0
<https://stackoverflow.com/posts/76409220/timeline>

I have a DLL with init, deinit, start, stop, methodcall methods. There is 
only one isolate scope.In init, I register the platform
platformZ = platform::NewDefaultPlatform(); V8::InitializePlatform
(platformZ.get()); V8::Initialize(); 

In start I create the isolate
// Create a new Isolate and make it the current one. isolate = 
Isolate::New(create_params); 
Isolate::Scope isolate_scope(isolate); // Create a stack-allocated handle 
scope. HandleScope handle_scope(isolate); .. Local<Context> context = 
Context::New(isolate, NULL, global); Context::Scope context_scope(context); 

In methodCall, I find the instance of MyClass and call myMethod in it. If I 
don't call isolate_scope, the is a crash after making around 100 calls to 
myMethod, I get an exception 0xC0000005: Access violation writing location 
0x00000000. When I call isolate_scope, the exception does not happen.
Isolate::Scope isolate_scope(isolate); // Go into the existing scope 
HandleScope handle_scope(isolate); 

I don't exit the scope by any other instructor. Could someone please tell 
me *why isolate_scope* makes it work?. If I call Isolate::Scope 
isolate_scope(isolate), it does not fail even on making a million calls.



   - javascript <https://stackoverflow.com/questions/tagged/javascript>
   - v8 <https://stackoverflow.com/questions/tagged/v8>

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/v8-dev/d3ad397f-9cb6-4ea4-b726-686a518ab4e0n%40googlegroups.com.

Reply via email to