Changeset 89808 in webkit
- Timestamp:
- Jun 27, 2011 1:41:55 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r89802 r89808 1 2011-06-27 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Remove evil uses of hasattr 6 https://bugs.webkit.org/show_bug.cgi?id=63430 7 8 For some reason these classes believe that they may be called with 9 various flavors of "option" elements and so carefully check to make 10 sure that the options element has their option before checking it. 11 12 We had a set_option_default method which was never called, so I made it 13 do what callsites seemed to want it to do and replaced 3 callers 14 who previously used hasattr manually to use set_option_default instead. 15 16 * Scripts/webkitpy/layout_tests/port/base.py: 17 * Scripts/webkitpy/layout_tests/port/webkit.py: 18 1 19 2011-06-27 Kent Tamura <tkent@chromium.org> 2 20 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
r89798 r89808 137 137 self._pretty_patch_available = None 138 138 139 if not hasattr(self._options, 'configuration') or self._options.configuration is None: 140 self._options.configuration = self.default_configuration() 139 self.set_option_default('configuration', self.default_configuration()) 141 140 self._test_configuration = None 142 141 self._multiprocessing_is_available = (multiprocessing is not None) 143 142 self._results_directory = None 144 145 if not hasattr(self._options, 'use_apache') or self._options.use_apache is None: 146 self._options.use_apache = self._default_to_apache() 143 self.set_option_default('use_apache', self._default_to_apache()) 147 144 148 145 def wdiff_available(self): … … 583 580 584 581 def set_option_default(self, name, default_value): 585 if not hasattr(self._options, name): 582 # FIXME: Callers could also use optparse_parser.Values.ensure_value, 583 # since this should always be a optparse_parser.Values object. 584 if not hasattr(self._options, name) or getattr(self._options, name) is None: 586 585 return setattr(self._options, name, default_value) 587 586 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
r88986 r89808 56 56 self._cached_apache_path = None 57 57 58 # FIXME: disable pixel tests until they are run by default on the 59 # build machines. 60 if not hasattr(self._options, "pixel_tests") or self._options.pixel_tests == None: 61 self._options.pixel_tests = False 58 # FIXME: disable pixel tests until they are run by default on the build machines. 59 self.set_option_default("pixel_tests", False) 62 60 63 61 def baseline_search_path(self):
Note: See TracChangeset
for help on using the changeset viewer.