Calling self.valueOf() inside a web worker throws an error
| Originator: | fasttime.on | ||
| Number: | rdar://21820506 | Date Originated: | 14-Jul-2015 10:38 PM |
| Status: | Open | Resolved: | |
| Product: | Safari | Product Version: | 8 |
| Classification: | Reproducible: |
The JavaScript method self.valueOf() throws an error when called from a web worker in Safari 8, also indirectly e.g. in (self + ""). Older Safari versions don't seem affected by the problem.
For a trivial example, create file named "worker.js" containing a single line of code:
self + "";
Then in an HTML file, start a web worker using the "worker.js" file above.
<script>new Worker('worker.js');</script>
In Safari 8, in the debug console, you can see the error:
TypeError: undefined is not an object
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!