I've observed that the exception thrown is - 
#
# Fatal error in v8::ToLocalChecked
# Empty MaybeLocal.
#

Is it possible to catch that exception to prevent v8 process from crashing?

On Wednesday, 12 July 2017 12:15:51 UTC+5:30, Ben Noordhuis wrote:
>
> On Wed, Jul 12, 2017 at 7:34 AM, Gautham B A 
> <[email protected] <javascript:>> wrote: 
> > Hi all, 
> > 
> > I'm trying to use the private field of a v8::Object to store some data 
> in it 
> > as shown here - https://github.com/nodejs/nan/issues/587. 
> > I was wondering if it's safe to use because when I try to read the 
> private 
> > field (Using FromJust() in the process), in the documentation it says 
> that 
> > v8 process will crash if Maybe<> is nothing (empty). 
> > It would be really helpful if someone could tell what scenario will 
> cause 
> > Maybe<> to become empty. 
>
> With the introduction of proxies, the answer is "just about any." 
>
> Calls into the VM that raise exceptions result in empty Maybe and 
> MaybeLocal instances.  Since proxies can intercept most operations on 
> JS functions and objects, careful error handling is required. 
>
> > Also, I would like to know if the API under v8::Private namespace is 
> safe to 
> > consume (by 'safe', I mean it shouldn't crash the v8 process, like the 
> one 
> > above). 
>
> No, strictly speaking.  There is always the possibility of a call to 
> v8::Private::New() triggering an out-of-memory condition, for example. 
>

-- 
-- 
v8-users mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to