From 4411b720c9fb9267325805f71781381355715c4d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 7 Mar 2019 16:54:48 +0100 Subject: [PATCH] fixup: fix StreamBase::FromObject --- src/stream_base-inl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index 4c1d5f4fc0b4f6..f9a67872f90d77 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -278,6 +278,9 @@ inline void StreamBase::AttachToObject(v8::Local obj) { } inline StreamBase* StreamBase::FromObject(v8::Local obj) { + if (obj->GetAlignedPointerFromInternalField(0) == nullptr) + return nullptr; + return static_cast( obj->GetAlignedPointerFromInternalField(kStreamBaseField)); }