doc: fix the example for embedders

Refs: #42670

PR-URL: https://github.com/nodejs/node/pull/42671
Fixes: https://github.com/nodejs/node/issues/42670
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
This commit is contained in:
Momtchil Momtchev authored and GitHub committed 2022-04-13 16:18:55 +01:00
1 parent 3caa2c1a00
commit d4d78361f2
1 file changed
+1
+1
View File
@@ -124,6 +124,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
{
Locker locker(isolate);
Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
// The v8::Context needs to be entered when node::CreateEnvironment() and
// node::LoadEnvironment() are being called.
Context::Scope context_scope(setup->context());