Title: [217855] trunk/Tools
Revision
217855
Author
[email protected]
Date
2017-06-06 13:39:08 -0700 (Tue, 06 Jun 2017)

Log Message

test-webkitpy: stop forking unsafely from within a spawned process
https://bugs.webkit.org/show_bug.cgi?id=172774

Patch by Dean Johnson <[email protected]> on 2017-06-06
Reviewed by Darin Adler.

* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(Builder.__init__): We don't use mechanize.Browser() as part of testing, so only initialize it when
it's going to be used.
(Builder.force_build):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (217854 => 217855)


--- trunk/Tools/ChangeLog	2017-06-06 20:28:34 UTC (rev 217854)
+++ trunk/Tools/ChangeLog	2017-06-06 20:39:08 UTC (rev 217855)
@@ -1,3 +1,15 @@
+2017-06-06  Dean Johnson  <[email protected]>
+
+        test-webkitpy: stop forking unsafely from within a spawned process
+        https://bugs.webkit.org/show_bug.cgi?id=172774
+
+        Reviewed by Darin Adler.
+
+        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+        (Builder.__init__): We don't use mechanize.Browser() as part of testing, so only initialize it when
+        it's going to be used.
+        (Builder.force_build):
+
 2017-06-06  Jonathan Bedard  <[email protected]>
 
         webkitpy: Process crash-logs for iOS devices

Modified: trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py (217854 => 217855)


--- trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2017-06-06 20:28:34 UTC (rev 217854)
+++ trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2017-06-06 20:39:08 UTC (rev 217855)
@@ -40,6 +40,7 @@
 from webkitpy.common.net.regressionwindow import RegressionWindow
 from webkitpy.common.system.logutils import get_logger
 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
+from webkitpy.thirdparty.autoinstalled.mechanize import Browser
 
 
 _log = get_logger(__file__)
@@ -51,9 +52,7 @@
         self._buildbot = buildbot
         self._builds_cache = {}
         self._revision_to_build_number = None
-        from webkitpy.thirdparty.autoinstalled.mechanize import Browser
-        self._browser = Browser()
-        self._browser.set_handle_robots(False)  # The builder pages are excluded by robots.txt
+        self._browser = None
 
     def name(self):
         return self._name
@@ -131,6 +130,11 @@
                 return form.find_control("username")
             except Exception, e:
                 return False
+
+        if not self._browser:
+            self._browser = Browser()
+            self._browser.set_handle_robots(False)  # The builder pages are excluded by robots.txt
+
         # ignore false positives for missing Browser methods - pylint: disable=E1102
         self._browser.open(self.url())
         self._browser.select_form(predicate=predicate)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to