[webkit-reviews] review granted: [Bug 23488] Make TimerBase thread-aware. For use in Workers. : [Attachment 27008] Review comments addressed.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 29 15:06:39 PST 2009
Darin Adler <darin at apple.com> has granted Dmitry Titov <dimich at chromium.org>'s
request for review:
Bug 23488: Make TimerBase thread-aware. For use in Workers.
https://bugs.webkit.org/show_bug.cgi?id=23488
Attachment 27008: Review comments addressed.
https://bugs.webkit.org/attachment.cgi?id=27008&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
> +static MainThreadSharedTimer* mainThreadSharedTimer()
> +{
> + static MainThreadSharedTimer* timer = 0;
> + if (!timer)
> + timer = new MainThreadSharedTimer();
> + return timer;
> +}
You can get the same behavior without an if statement.
static MainThreadSharedTimer* mainThreadSharedTimer()
{
static MainThreadSharedTimer* timer = new MainThreadSharedTimer;
return timer;
}
> +// Also, SharedTimer can be replaced with 0 before all timers are
destructed.
Should say "destroyed" here, not "destructed".
Looks fine, r=me
More information about the webkit-reviews
mailing list