Hi Experts, I added a v8::EscapableHandleScope case and tested the below Hello World code(https://raw.githubusercontent.com/v8/v8/12.3.219/samples/hello-world.cc) for the V8 engine(https://github.com/v8/v8) and found that it works well with v8 11.x.x version. However, it crashed or aborted with v8 12.3.x version in GetObjectTemplate. Does anyone have any idea about that issue? or any mistake I made? Thanks!
https://stackoverflow.com/questions/78420822/check-failed-on-escapablehandlescopeescape void Test(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { } v8::Local<v8::ObjectTemplate> GetObjectTemplate(v8::Isolate* isolate) { v8::EscapableHandleScope handle_scope(isolate); v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(isolate); result->SetInternalFieldCount(1); result->SetHandler(v8::NamedPropertyHandlerConfiguration(Test)); return handle_scope.Escape(result); } int main(int argc, char* argv[]) { // Initialize V8. v8::V8::InitializeICUDefaultLocation(argv[0]); v8::V8::InitializeExternalStartupData(argv[0]); std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); v8::V8::Initialize(); // Create a new Isolate and make it the current one. v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); v8::Isolate* isolate = v8::Isolate::New(create_params); { v8::Isolate::Scope isolate_scope(isolate); // Create a stack-allocated handle scope. v8::HandleScope handle_scope(isolate); v8::Local<v8::ObjectTemplate> global = GetObjectTemplate(isolate); // aborted here -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/185d6ce7-5f39-4964-a6d0-f2d3d8597ee0n%40googlegroups.com.