Bug 1888978 - Catch exceptions for PDF Viewer openAssetFileDescriptor r=geckoview-reviewers,ohall,calixte

Differential Revision: https://phabricator.services.mozilla.com/D206395
This commit is contained in:
Cathy Lu 2024-04-02 18:48:23 +00:00
parent bb7a82234e
commit 42b3885ca7

View File

@ -48,7 +48,7 @@ import org.mozilla.gecko.annotation.WrapForJNI;
Log.e(LOGTAG, "Cannot open the uri: " + aUri + " (invalid header)"); Log.e(LOGTAG, "Cannot open the uri: " + aUri + " (invalid header)");
close(); close();
} }
} catch (final IOException | SecurityException e) { } catch (final Exception e) {
Log.e(LOGTAG, "Cannot open the uri: " + aUri, e); Log.e(LOGTAG, "Cannot open the uri: " + aUri, e);
close(); close();
} }
@ -146,7 +146,7 @@ import org.mozilla.gecko.annotation.WrapForJNI;
Log.d(LOGTAG, "The uri is readable: " + uri); Log.d(LOGTAG, "The uri is readable: " + uri);
return true; return true;
} }
} catch (final IOException | SecurityException e) { } catch (final Exception e) {
// A SecurityException could happen if the uri is no more valid or if // A SecurityException could happen if the uri is no more valid or if
// we're in an isolated process. // we're in an isolated process.
Log.e(LOGTAG, "Cannot read the uri: " + uri, e); Log.e(LOGTAG, "Cannot read the uri: " + uri, e);