[Webkit-unassigned] [Bug 213448] On 64bit build, JSValue::operator bool maybe wrong.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 23 13:13:12 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=213448

--- Comment #2 from xc.o.c.1180 at gmail.com <xc.o.c.1180 at gmail.com> ---
Sorry for the confusion, the code snippet in previous description was modified version.

The original one as below,

// 0x0 can never occur naturally because it has a tag of 00, indicating a pointer value, but a payload of 0x0, which is in the (invalid) zero page.
inline JSValue::JSValue()
{
    u.asInt64 = ValueEmpty;
}

// 0x4 can never occur naturally because it has a tag of 00, indicating a pointer value, but a payload of 0x4, which is in the (invalid) zero page.
inline JSValue::JSValue(HashTableDeletedValueTag)
{
    u.asInt64 = ValueDeleted;
}

inline JSValue::JSValue(JSCell* ptr)
{
    u.asInt64 = reinterpret_cast<uintptr_t>(ptr);
}

inline JSValue::JSValue(const JSCell* ptr)
{
    u.asInt64 = reinterpret_cast<uintptr_t>(const_cast<JSCell*>(ptr));
}

inline JSValue::operator bool() const
{
    return u.asInt64;
}

Please check again.


Thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200623/f409681d/attachment.htm>


More information about the webkit-unassigned mailing list