Bug 91529 - Make Animation, TimingFunction and TransformOperation thread safe
Summary: Make Animation, TimingFunction and TransformOperation thread safe
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Noam Rosenthal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 11:38 PDT by Noam Rosenthal
Modified: 2012-07-17 13:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.82 KB, patch)
2012-07-17 11:41 PDT, Noam Rosenthal
levin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rosenthal 2012-07-17 11:38:30 PDT
Make Animation, TimingFunction and TransformOperation thread safe
Comment 1 Noam Rosenthal 2012-07-17 11:41:44 PDT
Created attachment 152794 [details]
Patch
Comment 2 David Levin 2012-07-17 12:00:30 PDT
Comment on attachment 152794 [details]
Patch

This doesn't have much context. It would be nice to have a over arching bug with more context on what is being done.

Anyway, I'm dubious of this patch since a cursory glance revealed something that seems fundamentally incorrect in it.
 
I'm hesitant to point it out because it makes me feel like the implications of this change haven't been examined. Please look carefully at these classes and make sure it is safe to do this. (Hint: It isn't right now.)
Comment 3 Noam Rosenthal 2012-07-17 12:43:52 PDT
(In reply to comment #2)
> (From update of attachment 152794 [details])
> This doesn't have much context. It would be nice to have a over arching bug with more context on what is being done.

Fair enough, I'll submit the patch that uses it when it's ready.
 
> I'm hesitant to point it out because it makes me feel like the implications of this change haven't been examined. Please look carefully at these classes and make sure it is safe to do this. (Hint: It isn't right now.)

Possible :)

Looking at those classes, the only thing I can think of is the assignment operator for Animation. Is there problems with the other classes as well? I can't spot any but it's possible I've missed something. 

I can probably do without making Animation ThreadSafeRefCounted. Is there a particular problem with TimingFunction and TransformOperation?
Comment 4 David Levin 2012-07-17 13:01:25 PDT
Thanks for trying :)

I'll be more direct. String uses non-threadsafe ref counting of StringImpl (so it isn't safe to destruct it on any thread). 

I think the only use of them is in Animation, so if you can avoid making it ThreadSafeRefCounted, I think you are on a better track,


 > I'll submit the patch that uses it when it's ready.
fwiw, I appreciate the incremental approach that you're doing. I was just hoping to see something with more of any overview as well.
Comment 5 Noam Rosenthal 2012-07-17 13:41:52 PDT
(In reply to comment #4)
> Thanks for trying :)
> 
> I'll be more direct. String uses non-threadsafe ref counting of StringImpl (so it isn't safe to destruct it on any thread). 
> 
> I think the only use of them is in Animation, so if you can avoid making it ThreadSafeRefCounted, I think you are on a better track,


ah, thanks for the catch. This actually does make me rethink of the approach, as later on we'd need to do the same for filters which have lots of strings inside. So probably the best approach would be to provide isolatedCopy functionality for these classes.