[webkit-reviews] review requested: [Bug 22524] XMLHttpRequest needs to have the static defines made threadsafe. : [Attachment 25566] Changed the static initialization to happen in the XHR constructor.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 27 23:13:35 PST 2008
David Levin <levin at chromium.org> has asked for review:
Bug 22524: XMLHttpRequest needs to have the static defines made threadsafe.
https://bugs.webkit.org/show_bug.cgi?id=22524
Attachment 25566: Changed the static initialization to happen in the XHR
constructor.
https://bugs.webkit.org/attachment.cgi?id=25566&action=review
------- Additional Comments from David Levin <levin at chromium.org>
I didn't like doing a mutex in the functions due to one of them being called
inside of a loop. As discussed, I've tried out a solution that initializes
the static variables in the constructor. I looked at a few ways of doing this.
The reason I put the variables in a struct and then initialized into a local
static was to take advantage of AtomicallyInitializedStatic.
If this doesn't seem that great, one alternative I can think of is to create
another macro like AtomicallyInitializedStatic (in threading.h) that allowed me
to call a function inside of this same mutex.
More information about the webkit-reviews
mailing list