Bug 1414995: Crash when publicsuffixlist could not be opened. r=nechen
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 06 Nov 2017 16:12:15 -0800
changeset 435632 7e505b1a27ad28dcba4b83f7db51b35406be17fc
parent 435631 6aa22b862a45b7db9a09175d2b939c4a79a80de7
child 435633 ff1aff2fa5b6beb672dd91ac475cba5e627add12
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersnechen
bugs1414995
milestone58.0a1
Bug 1414995: Crash when publicsuffixlist could not be opened. r=nechen MozReview-Commit-ID: 2agnVzKLkzd
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/publicsuffix/PublicSuffixPatterns.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/publicsuffix/PublicSuffixPatterns.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/publicsuffix/PublicSuffixPatterns.java
@@ -34,17 +34,17 @@ class PublicSuffixPatterns {
                     new BufferedInputStream(context.getAssets().open("publicsuffixlist"))));
 
             String line;
             while ((line = reader.readLine()) != null) {
                 EXACT.add(line);
             }
 
         } catch (IOException e) {
-            Log.e("Patterns", "IOException during loading public suffix list");
+            throw new IllegalStateException("resource publicsuffixlist could not be opened but is bundled with app", e);
         } finally {
             IOUtils.safeStreamClose(reader);
         }
 
         return EXACT;
     }