RESOLVED FIXED Bug 97833
Encapsulate private properties in PerfTestRunner better
https://bugs.webkit.org/show_bug.cgi?id=97833
Summary Encapsulate private properties in PerfTestRunner better
Ryosuke Niwa
Reported 2012-09-27 17:23:50 PDT
Right now, "private" properties of PerfTestRunner are just regular properties prefixed with _. We can do better by enclosing everything in a closure.
Attachments
Cleanup (18.09 KB, patch)
2012-09-28 14:50 PDT, Ryosuke Niwa
no flags
Fixed a test (18.08 KB, patch)
2012-09-28 14:51 PDT, Ryosuke Niwa
ojan: review+
Ryosuke Niwa
Comment 1 2012-09-28 14:50:03 PDT
Ryosuke Niwa
Comment 2 2012-09-28 14:51:51 PDT
Created attachment 166316 [details] Fixed a test
Ojan Vafai
Comment 3 2012-10-01 16:41:15 PDT
Comment on attachment 166316 [details] Fixed a test This is fine. A less fragile approach would be to wrap the whole file in an anonymous function and at the end of the function only expose the things you really want to expose, e.g.: window.PerfTestRunner = PerfTestRunner; That way, everything is private by default and people don't need to move code around to enable it to use a private helper function.
Ryosuke Niwa
Comment 4 2012-10-01 16:43:51 PDT
(In reply to comment #3) > (From update of attachment 166316 [details]) > This is fine. A less fragile approach would be to wrap the whole file in an anonymous function and at the end of the function only expose the things you really want to expose, e.g.: Yup. I'm doing that in a follow up. I'm just trying to make the diff unreadable.
Ryosuke Niwa
Comment 5 2012-10-01 16:44:02 PDT
*readable.
Ryosuke Niwa
Comment 6 2012-10-01 16:47:55 PDT
Note You need to log in before you can comment on or make changes to this bug.