Bug 90409

Summary: nrwt: make the worker class stand alone with a cleaner interface
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: New BugsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, ojan, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 90408    
Bug Blocks: 89725    
Attachments:
Description Flags
Patch ojan: review+

Description Dirk Pranke 2012-07-02 15:48:13 PDT
nrwt: make the worker class stand alone with a cleaner interface
Comment 1 Dirk Pranke 2012-07-02 15:54:59 PDT
Created attachment 150491 [details]
Patch
Comment 2 Ojan Vafai 2012-07-03 15:17:39 PDT
Comment on attachment 150491 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150491&action=review

> Tools/Scripts/webkitpy/layout_tests/controllers/worker.py:64
>      def safe_init(self):

I know you're not defining this method now, but this name doesn't match what it does to me. I would think "safe" would mean we can call it whenever we want, but it actually means we can only call it if the object doesn't need to be pickled. Should we just call this init_unpicklable_state? It's kinda verbose, but it's much more clear what it's doing.
Comment 3 Dirk Pranke 2012-07-03 15:19:06 PDT
(In reply to comment #2)
> (From update of attachment 150491 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150491&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/controllers/worker.py:64
> >      def safe_init(self):
> 
> I know you're not defining this method now, but this name doesn't match what it does to me. I would think "safe" would mean we can call it whenever we want, but it actually means we can only call it if the object doesn't need to be pickled. Should we just call this init_unpicklable_state? It's kinda verbose, but it's much more clear what it's doing.

It is a crappy name. In a later patch it gets renamed to "start" (and cleanup to "stop"), which I think is actually a clearer indication of its use.
Comment 4 Dirk Pranke 2012-07-03 16:32:39 PDT
Committed r121809: <http://trac.webkit.org/changeset/121809>