0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/addons/make-callback
Ben Noordhuis 921d2b080e 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: Anna Henningsen <anna@addaleax.net>
2016-10-25 13:18:01 +02:00
..
binding.cc test: rename target to exports for consistency 2016-10-19 19:57:02 +02:00
binding.gyp
test.js src: make cross-context MakeCallback() calls work 2016-10-25 13:18:01 +02:00