diff --git a/src/base_object.h b/src/base_object.h index 61e5d0cff97174..5ea2ea57d874f5 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -24,9 +24,9 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +#include // std::remove_reference #include "memory_tracker.h" #include "v8.h" -#include // std::remove_reference namespace node { @@ -88,7 +88,7 @@ class BaseObject : public MemoryRetainer { template static void InternalFieldGet(v8::Local property, const v8::PropertyCallbackInfo& info); - template + template static void InternalFieldSet(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info); @@ -205,13 +205,11 @@ inline T* Unwrap(v8::Local obj) { return BaseObject::FromJSObject(obj); } - -#define ASSIGN_OR_RETURN_UNWRAP(ptr, obj, ...) \ - do { \ - *ptr = static_cast::type>( \ - BaseObject::FromJSObject(obj)); \ - if (*ptr == nullptr) \ - return __VA_ARGS__; \ +#define ASSIGN_OR_RETURN_UNWRAP(ptr, obj, ...) \ + do { \ + *ptr = static_cast::type>( \ + BaseObject::FromJSObject(obj)); \ + if (*ptr == nullptr) return __VA_ARGS__; \ } while (0) // Implementation of a generic strong or weak pointer to a BaseObject. @@ -252,7 +250,7 @@ class BaseObjectPtrImpl final { private: union { - BaseObject* target; // Used for strong pointers. + BaseObject* target; // Used for strong pointers. BaseObject::PointerData* pointer_data; // Used for weak pointers. } data_;