< prev index next >
src/jdk/nashorn/internal/objects/Global.java
Print this page
*** 1003,1015 ****
* Script access to "current" Global instance
*
* @return the global singleton
*/
public static Global instance() {
! final Global global = Context.getGlobal();
! Objects.requireNonNull(global);
! return global;
}
private static Global instanceFrom(final Object self) {
return self instanceof Global? (Global)self : instance();
}
--- 1003,1013 ----
* Script access to "current" Global instance
*
* @return the global singleton
*/
public static Global instance() {
! return Objects.requireNonNull(Context.getGlobal());
}
private static Global instanceFrom(final Object self) {
return self instanceof Global? (Global)self : instance();
}
< prev index next >