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:
parent
fe77de196c
commit
2ab75b7a42
@ -3386,6 +3386,13 @@ void LoadEnvironment(Environment* env) {
|
||||
f->Call(Null(env->isolate()), 1, &arg);
|
||||
}
|
||||
|
||||
|
||||
void FreeEnvironment(Environment* env) {
|
||||
CHECK_NE(env, nullptr);
|
||||
env->Dispose();
|
||||
}
|
||||
|
||||
|
||||
static void PrintHelp();
|
||||
|
||||
static bool ParseDebugOpt(const char* arg) {
|
||||
|
@ -200,6 +200,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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user