[Webkit-unassigned] [Bug 193126] New: AtomicStringImpl::isInAtomicStringTable used without check ASSERT_DISABLED

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 3 15:32:29 PST 2019


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

            Bug ID: 193126
           Summary: AtomicStringImpl::isInAtomicStringTable used without
                    check ASSERT_DISABLED
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zhifei_fang at apple.com

We declare isInAtomicStringTable like this:


#if !ASSERT_DISABLED
    WTF_EXPORT_STRING_API static bool isInAtomicStringTable(StringImpl*);
#endif


however we use it like this:


private:
    AtomicStringImpl() = delete;

    ALWAYS_INLINE static Ref<AtomicStringImpl> add(StringImpl& string)
    {
        if (string.isAtomic()) {
>           ASSERT_WITH_MESSAGE(!string.length() || isInAtomicStringTable(&string), "The atomic string comes from an other thread!");
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            return static_cast<AtomicStringImpl&>(string);
        }
        return addSlowCase(string);
    }


if we define ASSERT_DISABLED this will cause a build failure

-- 
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/20190103/a8731f98/attachment-0001.html>


More information about the webkit-unassigned mailing list