[v8-users] Finding cycles in an object

2018-06-20 Thread Gonzalo Diethelm
I run the following JS code in the Chrome console: // Version 67.0.3396.87 (Official Build) (64-bit) var x = [1, 2, {"foo": 11}]; x[2].bar = x; Now from C++ code, I get ahold of x as a Local, and wish to traverse the whole structure; for the sake of the example, let's say I am converting it in

[v8-users] Running instanceof from C++ given a class name as a string

2018-06-20 Thread Gonzalo Diethelm
I run the following JS code in the Chrome console: // Version 67.0.3396.87 (Official Build) (64-bit) function Car(make) { this.make = make } var car = new Car('Ferrari') car instanceof Car // returns true Now, on my C++ code I get ahold of car (by looking "car" up in the global context), and wa

[v8-users] Where are let / const objects stored?

2018-06-20 Thread Gonzalo Diethelm
I run the following JS code in the Chrome console: // Version 67.0.3396.87 (Official Build) (64-bit) var p = 11 p // returns 11 let q = 12 q // returns 12 const r = 13 r // returns 13 Now, from C++ code, I can look up p in the global context, and it is found; its value is, unsurprisingly, 11.

[v8-users] v8 link error when generate cctest.exe

2018-06-20 Thread Amaranth F
I use this parameter to generate the ninja project: gn gen out/Release "--args=is_debug=false target_cpu=\"x64\" v8_static_library=true v8_use_snapshot=true v8_use_external_startup_data=false" and then run: ninja -C out\Release when it finally says: ninja: Entering directory `out\Release' [1