A few timer related headers are included where they aren't needed. The WorkerSharedTimer constructor is public but it is only used by doing "new WorkerSharedTimer" so it should be exposed using the static std::auto_ptr<> create() pattern.
Created attachment 27705 [details] Patch for bug.
Created attachment 27710 [details] Proposed fix. Removed extra parenthesis from last patch.
Is there indeed a value in adding the ::create to this private (for this cpp) and very simple class? It's a trivial helper class and seems to be more readable with just a simple constructor. I see there could be value in having create() method where it'd return PassRefPtr (to support refcounting), or there is an involved initialization that can have failures... Not sure there is a benefit in this case that is worthy of including extra header and more code.
Comment on attachment 27710 [details] Proposed fix. r=me
I think that the benefit is in following the same model everywhere, so searches (or automated tools) that someone may use to analyze code for possible leaks will not be tripped.
But I agree that this is a border case.
Created attachment 27736 [details] Proposed fix. (trivial cleanup) Removed static create method at dimich's request.
Comment on attachment 27736 [details] Proposed fix. (trivial cleanup) r=me
Comment on attachment 27736 [details] Proposed fix. (trivial cleanup) Committed as r41047.