The args are:
'is_debug = true', 
'enable_iterator_debugging = true', 
'symbol_level = 1', 
'target_cpu = "x64"', 
'is_component_build = false', 
'is_chrome_branded = false', 
'treat_warnings_as_errors = false', 
'is_clang = true', 
'use_glib = false', 
'use_custom_libcxx = false', 
'use_custom_libcxx_for_host = false', 
'optimize_for_size = false', 
'v8_monolithic = true', 
'v8_static_library = true', 
'v8_use_external_startup_data = false', 
'v8_enable_i18n_support = false', 
'v8_enable_webassembly = false', 
'v8_enable_lite_mode = true', 
'v8_enable_snapshot_compression = true', 
'exclude_unwind_tables = true', 
'v8_enable_verify_heap = false'



在2024年5月3日星期五 UTC+8 07:48:53<dong tommy> 写道:

> 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/4f647ba6-7f9a-45fb-8c62-9225f5063b6bn%40googlegroups.com.

Reply via email to