diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-04-17 23:16:22 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-04-30 00:23:33 +0200 |
commit | 723d5c058fa180684df13bd2a83bbf3ca6201957 (patch) | |
tree | 6aeb4bc88e6c437853327cced05ab797827c22f2 /src/base_object-inl.h | |
parent | 095bd569aef4fec433ddb26e681eaabff1f7fd10 (diff) | |
download | android-node-v8-723d5c058fa180684df13bd2a83bbf3ca6201957.tar.gz android-node-v8-723d5c058fa180684df13bd2a83bbf3ca6201957.tar.bz2 android-node-v8-723d5c058fa180684df13bd2a83bbf3ca6201957.zip |
src: prefer v8::Global over node::Persistent
`v8::Global` is essentially a nicer variant of `node::Persistent` that,
in addition to reset-on-destroy, also implements move semantics.
This commit makes the necessary replacements, removes
`node::Persistent` and (now-)unnecessary inclusions of the
`node_persistent.h` header, and makes some of the functions that
take Persistents as arguments more generic so that they work with all
`v8::PersistentBase` flavours.
PR-URL: https://github.com/nodejs/node/pull/27287
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/base_object-inl.h')
-rw-r--r-- | src/base_object-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base_object-inl.h b/src/base_object-inl.h index e3d645056a..fd61c15fea 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -56,7 +56,7 @@ BaseObject::~BaseObject() { } -Persistent<v8::Object>& BaseObject::persistent() { +v8::Global<v8::Object>& BaseObject::persistent() { return persistent_handle_; } |