Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e01e060

Browse filesBrowse files
danbevtargos
authored andcommitted
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: #20570 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 9177f73 commit e01e060
Copy full SHA for e01e060

File tree

Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎src/base_object-inl.h‎

Copy file name to clipboardExpand all lines: src/base_object-inl.h
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131

3232
namespace node {
3333

34-
BaseObject::BaseObject(Environment* env, v8::Local<v8::Object> handle)
35-
: persistent_handle_(env->isolate(), handle),
34+
BaseObject::BaseObject(Environment* env, v8::Local<v8::Object> object)
35+
: persistent_handle_(env->isolate(), object),
3636
env_(env) {
37-
CHECK_EQ(false, handle.IsEmpty());
38-
CHECK_GT(handle->InternalFieldCount(), 0);
39-
handle->SetAlignedPointerInInternalField(0, static_cast<void*>(this));
37+
CHECK_EQ(false, object.IsEmpty());
38+
CHECK_GT(object->InternalFieldCount(), 0);
39+
object->SetAlignedPointerInInternalField(0, static_cast<void*>(this));
4040
}
4141

4242

Collapse file

‎src/base_object.h‎

Copy file name to clipboardExpand all lines: src/base_object.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class Environment;
3434

3535
class BaseObject {
3636
public:
37-
// Associates this object with `handle`. It uses the 0th internal field for
37+
// Associates this object with `object`. It uses the 0th internal field for
3838
// that, and in particular aborts if there is no such field.
39-
inline BaseObject(Environment* env, v8::Local<v8::Object> handle);
39+
inline BaseObject(Environment* env, v8::Local<v8::Object> object);
4040
virtual inline ~BaseObject();
4141

4242
// Returns the wrapped object. Returns an empty handle when

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.