Changeset 58220 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Apr 24, 2010, 10:53:24 AM (15 years ago)
Author:
[email protected]
Message:

2010-04-24 Anton Muhin <[email protected]>

Reviewed by Darin Adler.

Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue

Former implementation attempted to use AtomicString(HashTableDeletedValue)
however those values cannot be used that way: one cannot construct
QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
in the table, for example.
https://bugs.webkit.org/show_bug.cgi?id=37722

  • wtf/RefPtr.h: expose hash table deleted value

2010-04-24 Anton Muhin <[email protected]>

Reviewed by Darin Adler.

Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue

Former implementation attempted to use AtomicString(HashTableDeletedValue)
however those values cannot be used that way: one cannot construct
QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
in the table, for example.
https://bugs.webkit.org/show_bug.cgi?id=37722

  • dom/QualifiedName.cpp: (WebCore::QualifiedName::deref): check that hash table deleted values never derefed
  • dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedName): add a constructor to create hash table deleted values (WebCore::QualifiedName::isHashTableDeletedValue): add a check if given instance is hash table deleted value (WTF::):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r58206 r58220  
     12010-04-24  Anton Muhin  <[email protected]>
     2
     3        Reviewed by Darin Adler.
     4
     5        Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
     6
     7        Former implementation attempted to use AtomicString(HashTableDeletedValue)
     8        however those values cannot be used that way: one cannot construct
     9        QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
     10        in the table, for example.
     11        https://bugs.webkit.org/show_bug.cgi?id=37722
     12
     13        * wtf/RefPtr.h: expose hash table deleted value
     14
    1152010-04-23  Sam Weinig  <[email protected]>
    216
  • trunk/JavaScriptCore/wtf/RefPtr.h

    r54724 r58220  
    8080        void swap(RefPtr&);
    8181
     82        static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
     83
    8284    private:
    83         static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
    84 
    8585        T* m_ptr;
    8686    };
Note: See TracChangeset for help on using the changeset viewer.