Merge mozilla-beta to release. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 16 Jan 2017 16:30:48 -0500
changeset 465636 85d16b0be539271da6484435f71c562acd9c3c56
parent 462218 d869faf3e2b43bd37d03adda77b3712f25c65e0c (current diff)
parent 465427 4d23adbd1004fa55093929e4934dc77d0de2fd01 (diff)
child 465637 9f938c1a1473bdaafe761245710071adf10ae881
push id42661
push userfelipc@gmail.com
push dateTue, 24 Jan 2017 16:14:20 +0000
reviewersmerge
milestone51.0
Merge mozilla-beta to release. a=merge
--- a/dom/base/FileReader.cpp
+++ b/dom/base/FileReader.cpp
@@ -416,16 +416,17 @@ FileReader::ReadFileContent(Blob& aBlob,
     return;
   }
 
   if (mDataFormat == FILE_AS_ARRAYBUFFER) {
     mFileData = js_pod_malloc<char>(mTotal);
     if (!mFileData) {
       NS_WARNING("Preallocation failed for ReadFileData");
       aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+      return;
     }
   }
 
   aRv = DoAsyncWait();
   if (NS_WARN_IF(aRv.Failed())) {
     FreeFileData();
     return;
   }
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -182,30 +182,33 @@ class TestingMixin(VirtualenvMixin, Buil
         url = None
         for reference_suffix in reference_suffixes:
             if reference_url.endswith(reference_suffix):
                 url = reference_url[:-len(reference_suffix)] + suffix
                 break
 
         return url
 
-    def query_symbols_url(self):
+    def query_symbols_url(self, raise_on_failure=False):
         if self.symbols_url:
             return self.symbols_url
 
         elif self.installer_url:
             symbols_url = self.query_prefixed_build_dir_url('.crashreporter-symbols.zip')
 
             # Check if the URL exists. If not, use none to allow mozcrash to auto-check for symbols
             try:
                 if symbols_url:
                     self._urlopen(symbols_url, timeout=120)
                     self.symbols_url = symbols_url
-            except (urllib2.HTTPError, urllib2.URLError, socket.error, socket.timeout):
-                self.exception("Can't figure out symbols_url from installer_url: %s!" % self.installer_url, level=WARNING)
+            except (urllib2.HTTPError, urllib2.URLError, socket.error, socket.timeout) as ex:
+                self.warning("Cannot open symbols url %s (installer url: %s): %s" %
+                    (symbols_url, self.installer_url, ex))
+                if raise_on_failure:
+                    raise
 
         # If no symbols URL can be determined let minidump_stackwalk query the symbols.
         # As of now this only works for Nightly and release builds.
         if not self.symbols_url:
             self.warning("No symbols_url found. Let minidump_stackwalk query for symbols.")
 
         return self.symbols_url
 
@@ -501,26 +504,39 @@ 2. running via buildbot and running the 
                                             file_name=file_name,
                                             parent_dir=dirs['abs_work_dir'],
                                             error_level=FATAL)
         self.installer_path = os.path.realpath(source)
         self.set_buildbot_property("build_url", self.installer_url, write_to_file=True)
 
     def _download_and_extract_symbols(self):
         dirs = self.query_abs_dirs()
-        self.symbols_url = self.query_symbols_url()
         if self.config.get('download_symbols') == 'ondemand':
+            self.symbols_url = self.query_symbols_url()
             self.symbols_path = self.symbols_url
             return
-        if not self.symbols_path:
-            self.symbols_path = os.path.join(dirs['abs_work_dir'], 'symbols')
 
-        self.set_buildbot_property("symbols_url", self.symbols_url,
-                                   write_to_file=True)
-        self.download_unpack(self.symbols_url, self.symbols_path)
+        else:
+            # In the case for 'ondemand', we're OK to proceed without getting a hold of the
+            # symbols right this moment, however, in other cases we need to at least retry
+            # before being unable to proceed (e.g. debug tests need symbols)
+            self.symbols_url = self.retry(
+                action=self.query_symbols_url,
+                kwargs={'raise_on_failure': True},
+                sleeptime=20,
+                error_level=FATAL,
+                error_message="We can't proceed without downloading symbols.",
+            )
+            if not self.symbols_path:
+                self.symbols_path = os.path.join(dirs['abs_work_dir'], 'symbols')
+
+            self.set_buildbot_property("symbols_url", self.symbols_url,
+                                       write_to_file=True)
+            if self.symbols_url:
+                self.download_unpack(self.symbols_url, self.symbols_path)
 
     def download_and_extract(self, extract_dirs=None, suite_categories=None):
         """
         download and extract test zip / download installer
         """
         # Swap plain http for https when we're downloading from ftp
         # See bug 957502 and friends
         from_ = "http://ftp.mozilla.org"