WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73269
js-test-pre: don't try to load stylesheet from a web worker
https://bugs.webkit.org/show_bug.cgi?id=73269
Summary
js-test-pre: don't try to load stylesheet from a web worker
David Grogan
Reported
2011-11-28 17:08:03 PST
js-test-pre: don't try to load stylesheet from a web worker
Attachments
Patch
(1.45 KB, patch)
2011-11-28 17:11 PST
,
David Grogan
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.52 KB, patch)
2011-11-28 19:30 PST
,
David Grogan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Grogan
Comment 1
2011-11-28 17:11:20 PST
Created
attachment 116854
[details]
Patch
David Grogan
Comment 2
2011-11-28 17:15:08 PST
Ojan, could you review this?
Ojan Vafai
Comment 3
2011-11-28 18:52:02 PST
Comment on
attachment 116854
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116854&action=review
> LayoutTests/ChangeLog:8 > + The other DOM-modification functions can be overridden but > + insertStyleSheet is called when js-test-pre loads.
I'm fine with adding the logic to make this file work in workers here. No need to override IMO. That will just make it harder to maintain the file since the definitions will be in different places.
> LayoutTests/fast/js/resources/js-test-pre.js:72 > + if (typeof document !== 'undefined')
I would find this more readable if you made an isWorker helper function that returned this value.
David Grogan
Comment 4
2011-11-28 19:29:52 PST
(In reply to
comment #3
)
> (From update of
attachment 116854
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=116854&action=review
> > > LayoutTests/ChangeLog:8 > > + The other DOM-modification functions can be overridden but > > + insertStyleSheet is called when js-test-pre loads. > > I'm fine with adding the logic to make this file work in workers here. No need to override IMO. That will just make it harder to maintain the file since the definitions will be in different places.
Sounds good.
> > LayoutTests/fast/js/resources/js-test-pre.js:72 > > + if (typeof document !== 'undefined') > > I would find this more readable if you made an isWorker helper function that returned this value.
Done.
David Grogan
Comment 5
2011-11-28 19:30:32 PST
Created
attachment 116871
[details]
Patch for landing
WebKit Review Bot
Comment 6
2011-11-28 19:48:29 PST
Comment on
attachment 116871
[details]
Patch for landing Clearing flags on attachment: 116871 Committed
r101320
: <
http://trac.webkit.org/changeset/101320
>
WebKit Review Bot
Comment 7
2011-11-28 19:48:33 PST
All reviewed patches have been landed. Closing bug.
Erik Arvidsson
Comment 8
2011-11-28 22:35:40 PST
Comment on
attachment 116871
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=116871&action=review
What tests inserts this in a worker?
> LayoutTests/fast/js/resources/js-test-pre.js:80 > window.onerror = function(message)
Doesn't the above line fail too?
David Grogan
Comment 9
2011-11-28 22:41:51 PST
(In reply to
comment #8
)
> (From update of
attachment 116871
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=116871&action=review
> > What tests inserts this in a worker?
Nothing checked in yet, but I have a few tests for indexeddb on workers locally that do.
> > LayoutTests/fast/js/resources/js-test-pre.js:80 > > window.onerror = function(message) > > Doesn't the above line fail too?
My tests assign window = self if run from a worker so I didn't run into any problems with it. But I see the potential problem.
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