diff --git a/src/base_object.h b/src/base_object.h index 1c52d507ab2226..cc7a220d078552 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 { @@ -84,7 +84,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); @@ -157,13 +157,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. @@ -199,7 +197,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_;