summaryrefslogtreecommitdiff
path: root/src/base_object-inl.h
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-05-07 10:24:42 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-05-09 10:05:23 +0200
commit36793b8c650e80ad6f35728d586eda7637703466 (patch)
treecdbe89120e4dd7993ba00431f748dc4127e6bebd /src/base_object-inl.h
parentd5b259e22bdd165929e20ae211f72d71d70c9dae (diff)
downloadandroid-node-v8-36793b8c650e80ad6f35728d586eda7637703466.tar.gz
android-node-v8-36793b8c650e80ad6f35728d586eda7637703466.tar.bz2
android-node-v8-36793b8c650e80ad6f35728d586eda7637703466.zip
src: rename handle parameter object
This commit renames the handle parameter for the BaseObject constructor to object instead of handle. The motivation for doing this is that when stepping through an inheritance chain it can sometimes be a little confusing when HandleWrap is in involved. HandleWrap has a handle parameter but calls the object that is passed to AsyncWrap object, but then when you end up in BaseObject it is named handle. PR-URL: https://github.com/nodejs/node/pull/20570 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/base_object-inl.h')
-rw-r--r--src/base_object-inl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/base_object-inl.h b/src/base_object-inl.h
index 11ba1c88da..786e1f26b4 100644
--- a/src/base_object-inl.h
+++ b/src/base_object-inl.h
@@ -31,12 +31,12 @@
namespace node {
-BaseObject::BaseObject(Environment* env, v8::Local<v8::Object> handle)
- : persistent_handle_(env->isolate(), handle),
+BaseObject::BaseObject(Environment* env, v8::Local<v8::Object> object)
+ : persistent_handle_(env->isolate(), object),
env_(env) {
- CHECK_EQ(false, handle.IsEmpty());
- CHECK_GT(handle->InternalFieldCount(), 0);
- handle->SetAlignedPointerInInternalField(0, static_cast<void*>(this));
+ CHECK_EQ(false, object.IsEmpty());
+ CHECK_GT(object->InternalFieldCount(), 0);
+ object->SetAlignedPointerInInternalField(0, static_cast<void*>(this));
}