On Sat, Jun 6, 2020 at 12:05 AM Elmi Ahmadov <elmi.1...@gmail.com> wrote: > > Previously, I was using the V8 version 7.4.x and I have check method to test > if the result object from the script execution is undefined/null or real > object. Which works fine with the older version of the V8. > > But now, I'm using V8 version 8.1.307 and my check does not work anymore. > > This is the code snippet to reproduce the issue: > // create Isolate*, v8::Local<v8::Context>> and ... > v8::Handle<v8::Value> undefinedResult = v8::Undefined(isolate); > v8::Handle<v8::Value> nullResult = v8::Null(isolate); > > std::cout << "isUndefined: " << undefinedResult->IsUndefined() << std::endl; > std::cout << "isNull: " << nullResult->IsNull() << std::endl; > > with the V8 version 7.4.x, the snippet produces the following output: > isUndefined: 1 > isNull: 1 > > But things turn out different for the V8 version 8.1.307, the same snippet > produces a different output: > isUndefined: 0 > isNull: 0 > > This is my gn args to generate the monolithic V8 7.4.x library: > target_os = "linux" > target_cpu = "x64" > is_component_build = false > is_debug = false > use_custom_libcxx = false > v8_monolithic = true > v8_use_external_startup_data = false > symbol_level = 0 > v8_enable_i18n_support= false > > I used the same gn args to generate the V8 version 8.1.307, but then V8 > immediatelly crashes when `->IsUndefined()`called. I found that V8 8.1 > contains a pointer compression feature so I disabled to see how this would > effect the result, now there is no crash but wrong result. > target_os = "linux" > target_cpu = "x64" > is_component_build = false > is_debug = false > use_custom_libcxx = false > v8_monolithic = true > v8_use_external_startup_data = false > symbol_level = 0 > v8_enable_i18n_support= false > v8_enable_pointer_compression = false > > What is the actual cause of this issue? How can I fix it? Maybe I'm missing > something but I don't know what it is.
v8_enable_31bit_smis_on_64bit_arch (corresponds to -DV8_31BIT_SMIS_ON_64BIT_ARCH) also needs to be the same when building V8 and your project. -- -- 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/CAHQurc9hxGLbfq%3DBXALCLZS7DetFDedx5pQS2KU8BEFSUHkdPw%40mail.gmail.com.