Bug 77487 - Make js-test-pre.js more worker friendly
Summary: Make js-test-pre.js more worker friendly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Grogan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 16:02 PST by David Grogan
Modified: 2012-02-03 12:46 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.67 KB, patch)
2012-01-31 16:06 PST, David Grogan
no flags Details | Formatted Diff | Diff
Patch (2.65 KB, patch)
2012-02-02 15:38 PST, David Grogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Grogan 2012-01-31 16:02:58 PST
Make js-test-pre.js more worker friendly
Comment 1 David Grogan 2012-01-31 16:06:34 PST
Created attachment 124840 [details]
Patch
Comment 2 David Grogan 2012-01-31 16:19:47 PST
Ojan, could you review this?
Comment 3 Ojan Vafai 2012-01-31 16:31:55 PST
Comment on attachment 124840 [details]
Patch

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

> LayoutTests/fast/js/resources/js-test-pre.js:3
> +if (!isWorker() && window.layoutTestController)
>      layoutTestController.dumpAsText(window.enablePixelTesting);

Why not just use self.layoutTestController and self.enablePixelTesting? Then you don't need to check or move isWorker. Similarly, can you change all uses of window in this file to self for consistency?
Comment 4 David Grogan 2012-02-02 15:38:43 PST
Created attachment 125200 [details]
Patch
Comment 5 David Grogan 2012-02-02 15:42:18 PST
(In reply to comment #3)
> (From update of attachment 124840 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124840&action=review
> 
> > LayoutTests/fast/js/resources/js-test-pre.js:3
> > +if (!isWorker() && window.layoutTestController)
> >      layoutTestController.dumpAsText(window.enablePixelTesting);
> 
> Why not just use self.layoutTestController and self.enablePixelTesting? Then you don't need to check or move isWorker. Similarly, can you change all uses of window in this file to self for consistency?

I was thinking that 'window' is clearer than 'self' so wanted to leave 'window' if possible.  But you're right, the consistency of 'self' everywhere is better.
Comment 6 WebKit Review Bot 2012-02-03 12:46:53 PST
Comment on attachment 125200 [details]
Patch

Clearing flags on attachment: 125200

Committed r106684: <http://trac.webkit.org/changeset/106684>
Comment 7 WebKit Review Bot 2012-02-03 12:46:58 PST
All reviewed patches have been landed.  Closing bug.