src/jdk/nashorn/internal/runtime/ListAdapter.java

changeset 459
0cfa27ed82fe
parent 408
fcb484c43348
child 476
fbd21b00197b
     1.1 --- a/src/jdk/nashorn/internal/runtime/ListAdapter.java	Thu Jul 18 16:47:45 2013 +0200
     1.2 +++ b/src/jdk/nashorn/internal/runtime/ListAdapter.java	Tue Jul 23 18:17:25 2013 +0530
     1.3 @@ -31,6 +31,7 @@
     1.4  import java.util.ListIterator;
     1.5  import java.util.NoSuchElementException;
     1.6  import java.util.RandomAccess;
     1.7 +import jdk.nashorn.internal.runtime.linker.Bootstrap;
     1.8  import jdk.nashorn.internal.runtime.linker.InvokeByName;
     1.9  
    1.10  /**
    1.11 @@ -157,7 +158,7 @@
    1.12          }
    1.13      }
    1.14      private static void checkFunction(Object fn, InvokeByName invoke) {
    1.15 -        if(!(fn instanceof ScriptFunction)) {
    1.16 +        if(!(Bootstrap.isCallable(fn))) {
    1.17              throw new UnsupportedOperationException("The script object doesn't have a function named " + invoke.getName());
    1.18          }
    1.19      }

mercurial