mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: add node::FreeEnvironment public API
Since debugger::Agent's interface is not exported, third party embedders will have linking errors if they call Environment's destructor directly. PR-URL: https://github.com/nodejs/node/pull/3098 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
01b314d165
commit
b21d145c2a
2 files changed
+8
No files matched your search
@@ -3226,6 +3226,13 @@ void LoadEnvironment(Environment* env) {
|
||||
f->Call(global, 1, &arg);
|
||||
}
|
||||
|
||||
|
||||
void FreeEnvironment(Environment* env) {
|
||||
CHECK_NE(env, nullptr);
|
||||
env->Dispose();
|
||||
}
|
||||
|
||||
|
||||
static void PrintHelp();
|
||||
|
||||
static bool ParseDebugOpt(const char* arg) {
|
||||
|
||||
@@ -196,6 +196,7 @@ NODE_EXTERN Environment* CreateEnvironment(v8::Isolate* isolate,
|
||||
int exec_argc,
|
||||
const char* const* exec_argv);
|
||||
NODE_EXTERN void LoadEnvironment(Environment* env);
|
||||
NODE_EXTERN void FreeEnvironment(Environment* env);
|
||||
|
||||
// NOTE: Calling this is the same as calling
|
||||
// CreateEnvironment() + LoadEnvironment() from above.
|
||||
|
||||
Reference in new issue
Block a user