From: Jay Freeman (saurik) Date: Fri, 8 Jan 2016 07:51:46 +0000 (-0800) Subject: Better document and assert against a pooling case. X-Git-Tag: v0.9.590~38 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/aa76066c431251166f63fe83808ecfe7fa7b8822?hp=cfcbf601798082a68a1f3e46788773bf62f9708a Better document and assert against a pooling case. --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index ca3662b..0a93fdd 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -1535,7 +1535,8 @@ static NSBlock *CYCastNSBlock(CYPool &pool, JSContextRef context, JSValueRef val namespace sig { void Block::PoolFFI(CYPool *pool, JSContextRef context, ffi_type *ffi, void *data, JSValueRef value) const { - // XXX: this function might not handle the idea of a null pool + // XXX: this function actually needs to handle null pools as it is an autorelease + _assert(pool != NULL); *reinterpret_cast(data) = CYCastNSBlock(*pool, context, value, &signature); }