[Webkit-unassigned] [Bug 23488] Make TimerBase thread-aware. For use in Workers.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 29 15:06:39 PST 2009


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


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27008|review?                     |review+
               Flag|                            |




------- Comment #7 from darin at apple.com  2009-01-29 15:06 PDT -------
(From update of attachment 27008)
> +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


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list