Skip to content

Commit

Permalink
fixup: fix StreamBase::FromObject
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Mar 7, 2019
1 parent 2fd9181 commit 4411b72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stream_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ inline void StreamBase::AttachToObject(v8::Local<v8::Object> obj) {
}

inline StreamBase* StreamBase::FromObject(v8::Local<v8::Object> obj) {
if (obj->GetAlignedPointerFromInternalField(0) == nullptr)
return nullptr;

return static_cast<StreamBase*>(
obj->GetAlignedPointerFromInternalField(kStreamBaseField));
}
Expand Down

0 comments on commit 4411b72

Please sign in to comment.