[webkit-reviews] review granted: [Bug 182017] Update Poisoned pointers to take a Poison class instead of a uintptr_t&. : [Attachment 332087] proposed patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 23 15:58:43 PST 2018


Filip Pizlo <fpizlo at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 182017: Update Poisoned pointers to take a Poison class instead of a
uintptr_t&.
https://bugs.webkit.org/show_bug.cgi?id=182017

Attachment 332087: proposed patch.

https://bugs.webkit.org/attachment.cgi?id=332087&action=review




--- Comment #4 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 332087
  --> https://bugs.webkit.org/attachment.cgi?id=332087
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=332087&action=review

> Source/WTF/wtf/Poisoned.h:203
> +    ALWAYS_INLINE static PoisonedBits poison(const Poisoned* thisPoisoned, U
ptr) { return ptr ? bitwise_cast<PoisonedBits>(ptr) ^ Poison::key(thisPoisoned)
: 0; }

Note sure if passing Poisoned does what you'll eventually want.

The caller that poisons and unpoisons pointers may have any amount of context
information available, and that information may not be in `this`.  But, I'm OK
with this change, because I can see how this would work for typed arrays.


More information about the webkit-reviews mailing list