[webkit-reviews] review requested: [Bug 22567] HashTable needs to be made usable from multiple threads. : [Attachment 25623] Addressed comments.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 1 04:00:48 PST 2008

David Levin <levin at chromium.org> has asked  for review:
Bug 22567: HashTable needs to be made usable from multiple threads.

Attachment 25623: Addressed comments.

------- Additional Comments from David Levin <levin at chromium.org>

I've made the remaining const methods on HashTable thread safe as well.

> > -	     static int numAccesses;
> > +	     static volatile int numAccesses;
> Is this change needed?

The function definition includes it "atomicIncrement(int volatile*)".  The only
place I could find this function used was in RefCountedLeakCounter.cpp and the
variable that it uses for atomicIncrement is defined as volatile.

After thinking about it more, I realized that this is like the const modifier
in a prototype which indicates that the function can handle a volatile int* (as
well as an int*), so I've removed the volatile for all of these variables.

More information about the webkit-reviews mailing list