diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-09-29 01:29:07 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-19 13:47:29 +0100 |
commit | 7e6104f1bb63a07885b08f277c3b708caa6b8a23 (patch) | |
tree | 32d76e6f055d3bfacd849633db3a8af3868a328c /src/handle_wrap.h | |
parent | efce655c0f1671d0e86b5c89092ac93db983ef94 (diff) | |
download | android-node-v8-7e6104f1bb63a07885b08f277c3b708caa6b8a23.tar.gz android-node-v8-7e6104f1bb63a07885b08f277c3b708caa6b8a23.tar.bz2 android-node-v8-7e6104f1bb63a07885b08f277c3b708caa6b8a23.zip |
src: introduce custom smart pointers for `BaseObject`s
Referring to `BaseObject` instances using standard C++ smart pointers
can interfere with BaseObject’s own cleanup mechanisms
(explicit delete, delete-on-GC and delete-on-cleanup).
Introducing custom smart pointers allows referring to `BaseObject`s
safely while keeping those mechanisms intact.
Refs: https://github.com/nodejs/quic/pull/141
Refs: https://github.com/nodejs/quic/pull/149
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/30374
Refs: https://github.com/nodejs/quic/pull/165
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/handle_wrap.h')
-rw-r--r-- | src/handle_wrap.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/handle_wrap.h b/src/handle_wrap.h index fbcea4ae44..612874aa2e 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -76,14 +76,13 @@ class HandleWrap : public AsyncWrap { static v8::Local<v8::FunctionTemplate> GetConstructorTemplate( Environment* env); - void MakeWeak(); // This hides BaseObject::MakeWeak() - protected: HandleWrap(Environment* env, v8::Local<v8::Object> object, uv_handle_t* handle, AsyncWrap::ProviderType provider); virtual void OnClose() {} + void OnGCCollect() final; void MarkAsInitialized(); void MarkAsUninitialized(); |