Commit 921d2b08 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

src: make cross-context MakeCallback() calls work

Check that invoking a callback on a receiver from a different context
works.

It ran afoul of an `env->context() == isolate->GetCurrentContext()`
assertion so retrieve the environment from the callback context and
the context to enter from the environment's context() method.

We could also have retrieved the environment from the receiver's context
and that would have made little practical difference.  It just seemed
more correct to get it from the callback context because that is the
actual execution context.

PR-URL: https://github.com/nodejs/node/pull/9221


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent e4290dec
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment