mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Ignore any exception during script class initialization unless it is an instance of RhinoException. In this way lazily class loading or incompatible with the current JVMs jars will simply hide the script variables.
This commit is contained in:
parent
9af31a7101
commit
8799f9f62b
@ -83,10 +83,14 @@ public final class LazilyLoadedCtor {
|
||||
try {
|
||||
ScriptableObject.defineClass(obj, cl, sealed);
|
||||
isReplaced = true;
|
||||
} catch (RhinoException e) {
|
||||
throw e;
|
||||
} catch (SecurityException ex) {
|
||||
removeOnError = true;
|
||||
} catch (Exception e) {
|
||||
throw Context.throwAsScriptRuntimeEx(e);
|
||||
} catch (Throwable ex) {
|
||||
// Ignore any other erors. Due to lazily class loading
|
||||
// it may indicate absence of some necessary classes.
|
||||
removeOnError = true;
|
||||
}
|
||||
}
|
||||
if (removeOnError) {
|
||||
|
Loading…
Reference in New Issue
Block a user