Dylan Thacker-Smith
Dylan Thacker-Smith
[v8::Isolate::TerminateExecution()'s documentation](https://v8docs.nodesource.com/node-16.0/d5/dda/classv8_1_1_isolate.html#ab33b5ea0fbd412614931733449c3d659) says: > This method can be used by any thread even if that thread has not acquired the V8 lock with a Locker object. [v8::Isolate::CancelTerminateExecution()'s documentation](https://v8docs.nodesource.com/node-16.0/d5/dda/classv8_1_1_isolate.html#accd54de1bf8bdb27a541a578241d4870) says the...
The HandleScope check will pass if `!v8::Locker::IsActive()` is true, which you can see from [its implementation](https://source.chromium.org/chromium/chromium/src/+/master:v8/src/execution/v8threads.cc;l=55) that it is true if locker was never used in the process. So using...
> I'm not sure if that's a trade-off worth making though. I mostly was just starting the discussion, since this is a more implicit part of the API. There are...
Note that cgo effectively locks the OS thread to run the C code on the thread stack, so we don't need to worry about goroutine migration during those C calls....
> in fact the docs say one must hold a Locker when calling SetStackLimit() It says "If you are using threads then you should hold the V8::Locker lock" since the...
> The Locker docs state "the v8::Locker and v8::Unlocker classes must be used to signal thread switches to V8." Actually, that was hidden in the [v8::Unlocker documentation](https://v8.github.io/api/head/classv8_1_1Unlocker.html). Nice find. Implementation...
Yes, it should work fine on v0.6.0. https://pkg.go.dev/rogchap.com/[email protected]#readme-windows has the instructions for using it with that version. I suppose we could like to that in the README
I had trouble cross-compiling V8 for Windows from macOS. There wasn't ever any instructions for cross-compiling for Windows, so I'm not sure if different patches to the V8 build system...
For passing in strings, we might want adapter functions in the `import "C"` preamble so that we can access `_GoString_`, _GoStringPtr and _GoStringLen. That way the full string can be...
[v8::Array](https://v8.github.io/api/head/classv8_1_1Array.html)::New is an overloaded function, so we should consider how we want to expose the two ways it can be called. It looks like they correspond to the [JS Array...