Backed out changeset c36827e81a7a (bug 1656515) for causing Bug 1659045. CLOSED TREE
authorButkovits Atila <abutkovits@mozilla.com>
Fri, 14 Aug 2020 10:23:11 +0300
changeset 544647 383073b9e168de132b6bed85e00d31c41e0e4caf
parent 544646 ce9054fff73e5a8c66223a3dc77b29bbe41e9f08
child 544648 44a65091d30270a181dc7e9593eb2b3e700ca1c7
push id124174
push userabutkovits@mozilla.com
push dateFri, 14 Aug 2020 07:26:38 +0000
treeherderautoland@383073b9e168 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1656515, 1659045
milestone81.0a1
backs outc36827e81a7acdc660fe7772e419e0b4d32ab1f3
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset c36827e81a7a (bug 1656515) for causing Bug 1659045. CLOSED TREE
intl/locale/LocaleService.cpp
--- a/intl/locale/LocaleService.cpp
+++ b/intl/locale/LocaleService.cpp
@@ -292,34 +292,22 @@ bool LocaleService::LanguagesMatch(const
 }
 
 bool LocaleService::IsServer() { return mIsServer; }
 
 static bool GetGREFileContents(const char* aFilePath, nsCString* aOutString) {
   // Look for the requested file in omnijar.
   RefPtr<CacheAwareZipReader> zip = Omnijar::GetReader(Omnijar::GRE);
   if (zip) {
-    const auto item = zip->GetItem(aFilePath);
-    if (!item) {
+    uint32_t length;
+    const uint8_t* data = zip->GetData(aFilePath, &length);
+    if (!data) {
       return false;
     }
-
-    MOZ_ASSERT(item->RealSize());
-
-    auto data = MakeUnique<uint8_t[]>(item->RealSize());
-    CacheAwareZipCursor cursor(item, zip, data.get(), item->RealSize());
-
-    uint32_t count;
-    cursor.Read(&count);
-
-    if (count != item->RealSize()) {
-      return false;
-    }
-
-    aOutString->Assign(reinterpret_cast<const char*>(data.get()), count);
+    aOutString->Assign(reinterpret_cast<const char*>(data), length);
     return true;
   }
 
   // If we didn't have an omnijar (i.e. we're running a non-packaged
   // build), then look in the GRE directory.
   nsCOMPtr<nsIFile> path;
   if (NS_FAILED(nsDirectoryService::gService->Get(
           NS_GRE_DIR, NS_GET_IID(nsIFile), getter_AddRefs(path)))) {