WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 78181
nrwt: simplify worker interface
https://bugs.webkit.org/show_bug.cgi?id=78181
Summary
nrwt: simplify worker interface
Dirk Pranke
Reported
2012-02-08 16:48:58 PST
nrwt: simplify worker interface
Attachments
Patch
(6.23 KB, patch)
2012-02-08 17:09 PST
,
Dirk Pranke
no flags
Details
Formatted Diff
Diff
merge to r107884
(6.62 KB, patch)
2012-02-15 22:31 PST
,
Dirk Pranke
no flags
Details
Formatted Diff
Diff
fix indentation
(6.84 KB, patch)
2012-02-15 23:06 PST
,
Dirk Pranke
tony
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Pranke
Comment 1
2012-02-08 17:09:03 PST
Created
attachment 126196
[details]
Patch
Dirk Pranke
Comment 2
2012-02-15 22:31:51 PST
Created
attachment 127311
[details]
merge to
r107884
Dirk Pranke
Comment 3
2012-02-15 22:33:46 PST
Tony, can you take a look at this?
Dirk Pranke
Comment 4
2012-02-15 23:06:55 PST
Created
attachment 127314
[details]
fix indentation
Tony Chang
Comment 5
2012-02-16 10:21:30 PST
Comment on
attachment 127314
[details]
fix indentation Should you remove duplicate methods in _TestWorker? Since there's only one real Worker implementation, it's impossible to tell what should be shared and what shouldn't be shared. There's nothing wrong with this code change, but I can't evaluate if it's better or worse than before.
Dirk Pranke
Comment 6
2012-02-16 11:45:13 PST
(In reply to
comment #5
)
> (From update of
attachment 127314
[details]
) > Should you remove duplicate methods in _TestWorker? >
Good catch, will do.
> Since there's only one real Worker implementation, it's impossible to tell what should be shared and what shouldn't be shared. There's nothing wrong with this code change, but I can't evaluate if it's better or worse than before.
for a second implementation, check out the Worker implementation that could be used in test-webkitpy in
https://bugs.webkit.org/attachment.cgi?id=126445&action=review
(part of
bug 78185
). Ultimately the whole message-passing aspect of this will get hidden and I can cut a couple hundred lines out of manager_worker_broker.py, dramatically simplifying the implementation, but I don't quite have that patch ready for review yet.
Tony Chang
Comment 7
2012-02-16 12:24:09 PST
I was trying to make 2 points: 1) An abstract interface or base class with a single implementation don't add value. _TestWorker should inherit from Worker. 2) When creating an abstract interface or base class, it's easier to understand when there are two implementations. Which is to say, I would rather review (a) a patch which adds the new implementation, then refactors to share code or (b) a patch that adds the second implementation and base class at the same time. I'm sure when you implemented this, you did either (a) or (b). In the current patch, I don't see any of that, so I can't evaluate whether this is an improvement. This patch is fine, but it doesn't make sense without future context.
Dirk Pranke
Comment 8
2012-02-16 17:11:51 PST
Committed
r108005
: <
http://trac.webkit.org/changeset/108005
>
Dirk Pranke
Comment 9
2012-02-16 19:21:34 PST
(In reply to
comment #7
)
> I was trying to make 2 points: > 1) An abstract interface or base class with a single implementation don't add value. _TestWorker should inherit from Worker.
I'm not sure I agree with the first sentence, but this bug is probably not the ideal place to discuss such a broad statement about design :). I have considered your point, though.
> 2) When creating an abstract interface or base class, it's easier to understand when there are two implementations. Which is to say, I would rather review (a) a patch which adds the new implementation, then refactors to share code or (b) a patch that adds the second implementation and base class at the same time. I'm sure when you implemented this, you did either (a) or (b). In the current patch, I don't see any of that, so I can't evaluate whether this is an improvement.
>
> This patch is fine, but it doesn't make sense without future context.
Understood. Unfortunately, this can be hard to do in practice. I will attempt to do better in the future.
Dirk Pranke
Comment 10
2012-02-16 19:48:58 PST
(In reply to
comment #9
)
> I'm not sure I agree with the first sentence, but this bug is probably not the ideal place to discuss such a broad statement about design :). I have considered your point, though. >
Note that I would like to understand what you're getting at here better; this was not meant to be dismissive. Also, I forgot to actually fix/update the test code ... see
bug 78870
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug