diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-10-31 15:31:38 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2020-11-02 16:21:10 +0300 |
commit | dfc288e7fdbe888f4e134772de421684247f0bea (patch) | |
tree | 49ad0d1aa0dea08a2c9884cd299df0eef836d5dc /src/api | |
parent | 09af8c822c8e931b29427aaec72604ab03fa54c1 (diff) |
src: clean up embedder API
Remove deprecated APIs (and deprecate one legacy API).
PR-URL: https://github.com/nodejs/node/pull/35897
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/environment.cc | 32 | ||||
-rw-r--r-- | src/api/hooks.cc | 5 |
2 files changed, 2 insertions, 35 deletions
diff --git a/src/api/environment.cc b/src/api/environment.cc index fa994bc41ec..68395a61675 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -264,10 +264,6 @@ void SetIsolateUpForNode(v8::Isolate* isolate) { SetIsolateUpForNode(isolate, settings); } -Isolate* NewIsolate(ArrayBufferAllocator* allocator, uv_loop_t* event_loop) { - return NewIsolate(allocator, event_loop, GetMainThreadMultiIsolatePlatform()); -} - // TODO(joyeecheung): we may want to expose this, but then we need to be // careful about what we override in the params. Isolate* NewIsolate(Isolate::CreateParams* params, @@ -327,18 +323,6 @@ struct InspectorParentHandleImpl : public InspectorParentHandle { }; #endif -Environment* CreateEnvironment(IsolateData* isolate_data, - Local<Context> context, - int argc, - const char* const* argv, - int exec_argc, - const char* const* exec_argv) { - return CreateEnvironment( - isolate_data, context, - std::vector<std::string>(argv, argv + argc), - std::vector<std::string>(exec_argv, exec_argv + exec_argc)); -} - Environment* CreateEnvironment( IsolateData* isolate_data, Local<Context> context, @@ -410,16 +394,9 @@ NODE_EXTERN std::unique_ptr<InspectorParentHandle> GetInspectorParentHandle( #endif } -void LoadEnvironment(Environment* env) { - USE(LoadEnvironment(env, - StartExecutionCallback{}, - {})); -} - MaybeLocal<Value> LoadEnvironment( Environment* env, - StartExecutionCallback cb, - std::unique_ptr<InspectorParentHandle> removeme) { + StartExecutionCallback cb) { env->InitializeLibuv(); env->InitializeDiagnostics(); @@ -428,8 +405,7 @@ MaybeLocal<Value> LoadEnvironment( MaybeLocal<Value> LoadEnvironment( Environment* env, - const char* main_script_source_utf8, - std::unique_ptr<InspectorParentHandle> removeme) { + const char* main_script_source_utf8) { CHECK_NOT_NULL(main_script_source_utf8); return LoadEnvironment( env, @@ -460,10 +436,6 @@ Environment* GetCurrentEnvironment(Local<Context> context) { return Environment::GetCurrent(context); } -MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform() { - return per_process::v8_platform.Platform(); -} - MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env) { return GetMultiIsolatePlatform(env->isolate_data()); } diff --git a/src/api/hooks.cc b/src/api/hooks.cc index 84c91a2100b..f3f685b167f 100644 --- a/src/api/hooks.cc +++ b/src/api/hooks.cc @@ -22,11 +22,6 @@ void RunAtExit(Environment* env) { env->RunAtExitCallbacks(); } -void AtExit(void (*cb)(void* arg), void* arg) { - auto env = Environment::GetThreadLocalEnv(); - AtExit(env, cb, arg); -} - void AtExit(Environment* env, void (*cb)(void* arg), void* arg) { CHECK_NOT_NULL(env); env->AtExit(cb, arg); |