A v8::RegExp requires an Isolate. (There are at least two indicators for
this: (1) the class RegExp derives from Object, as such they are JavaScript
objects, and JavaScript objects always belong to an Isolate; (2) Local<>s
are used to hold RegExp instances, and Locals are used to refer to objects
on the managed heap, which is part of an Isolate.)

Aside from that, v8::RegExps operate on v8::Strings, which also require an
Isolate to live in.


On Mon, Aug 3, 2020 at 10:37 PM Paul Maréchal <[email protected]>
wrote:

> Hi,
>
> I am writing a Node.js addon that does work in a native thread. I need to
> run a regex match in said thread and I was hoping to use V8's RegExp
> objects.
>
> It is fair to say that I'm not a C++ expert, so I was wondering if anyone
> had any pointers regarding this? Is it even possible/a good idea?
>
> The API I am looking at has a deprecated static method that looked
> interesting but I don't understand how I am supposed to use the new one?
> https://v8docs.nodesource.com/node-10.15/d8/da7/classv8_1_1_reg_exp.html#aad5eb4ac27a23660c32f289da9427367
>
> Thanks in advance,
> Paul.
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/667aed79-f5df-4005-ab55-e079cfc20b92n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/667aed79-f5df-4005-ab55-e079cfc20b92n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKSzg3QpALxgBg8d4x1Uc8DENY09xRmhT%2Bjuo%2B_GYpOFDfpgng%40mail.gmail.com.

Reply via email to