I personally think that it's a bad idea to expose V8 to several different
embedders in the same process. The V8 API is not designed for that and it
will cause issues, not only the one you are pointing out here.

On Sat, Feb 6, 2021 at 1:37 PM Sajal Khandelwal <saja...@gmail.com> wrote:

> Thank you, Yang.
> I'd imagine that'd be the easiest.
>
> But off the top of my head, I am imagining a scenario of what if some
> random C++ native add on, chose to replace that hook for its own use.
> Basically, the concern being even as an embedder, you might not have total
> control of what some random library might choose to replace that hook.
>
> On Saturday, February 6, 2021 at 12:54:14 AM UTC-5 Yang Guo wrote:
>
>> Is there a problem implementing this in the embedder? I think that would
>> be the preferred solution. To add complexity where it is necessary.
>>
>> Cheers,
>>
>> Yang
>>
>> On Sat, 6 Feb 2021, 06:50 Sajal Khandelwal, <saj...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> v8::Isolate::setPromiseHook seems to override the last set hook. This
>>> becomes inconvenient when some other piece of code in a large codebase (of
>>> which you may have no control, for example async_hooks in node js)
>>> overrides the hook. Would it make sense to add another method, perhaps
>>> addPromiseHook that would invoke more than one hook? Similar reasoning
>>> stands for v8::Isolate::SetPromiseRejectCallback.
>>>
>>>
>>> --
>>> --
>>> v8-dev mailing list
>>> v8-...@googlegroups.com
>>> 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 v8-dev+un...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/v8-dev/6eb42f45-d9a0-47d1-bbf7-e4125459b1b4n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/v8-dev/6eb42f45-d9a0-47d1-bbf7-e4125459b1b4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> 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 v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/1a4807c2-773e-4fe4-b067-3ec0f9d976e8n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/1a4807c2-773e-4fe4-b067-3ec0f9d976e8n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAFSTc_hB0VrojhsxG7MzP%3DgJMXmwodM%3D1yRA92hHuceNf9vYmA%40mail.gmail.com.

Reply via email to