зеркало из https://github.com/mozilla/gecko-dev.git
Better (?) error when initializing and the security resource isn't found.
This commit is contained in:
Родитель
79cb20e767
Коммит
3bb6bca352
|
@ -1645,14 +1645,16 @@ public final class Context {
|
|||
|
||||
private static boolean requireSecurityDomain = true;
|
||||
static {
|
||||
final String securityResourceName =
|
||||
"org.mozilla.javascript.resources.Security";
|
||||
try {
|
||||
ResourceBundle rb = ResourceBundle.getBundle(
|
||||
"org.mozilla.javascript.resources.Security");
|
||||
ResourceBundle rb = ResourceBundle.getBundle(securityResourceName);
|
||||
String s = rb.getString("security.requireSecurityDomain");
|
||||
requireSecurityDomain = s.equals("true");
|
||||
} catch (java.util.MissingResourceException mre) {
|
||||
// Assume stricter policy.
|
||||
requireSecurityDomain = true;
|
||||
throw new SecurityException("Resource \"" + securityResourceName +
|
||||
"\" not found.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1645,14 +1645,16 @@ public final class Context {
|
|||
|
||||
private static boolean requireSecurityDomain = true;
|
||||
static {
|
||||
final String securityResourceName =
|
||||
"org.mozilla.javascript.resources.Security";
|
||||
try {
|
||||
ResourceBundle rb = ResourceBundle.getBundle(
|
||||
"org.mozilla.javascript.resources.Security");
|
||||
ResourceBundle rb = ResourceBundle.getBundle(securityResourceName);
|
||||
String s = rb.getString("security.requireSecurityDomain");
|
||||
requireSecurityDomain = s.equals("true");
|
||||
} catch (java.util.MissingResourceException mre) {
|
||||
// Assume stricter policy.
|
||||
requireSecurityDomain = true;
|
||||
throw new SecurityException("Resource \"" + securityResourceName +
|
||||
"\" not found.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче