nashorn/src/jdk/nashorn/internal/objects/NativeFunction.java
changeset 16186 91bd9d2aa2f5
parent 16151 97c1e756ae1e
child 16188 d6390b0ea32a
equal deleted inserted replaced
16185:893aabe8c800 16186:91bd9d2aa2f5
    65         }
    65         }
    66         return ((ScriptFunction)self).toSource();
    66         return ((ScriptFunction)self).toSource();
    67     }
    67     }
    68 
    68 
    69     private static Object convertThis(final ScriptFunction func, final Object thiz) {
    69     private static Object convertThis(final ScriptFunction func, final Object thiz) {
    70         if (!(thiz instanceof ScriptObject) && !func.isStrict() && !func.isBuiltin()) {
    70         if (!(thiz instanceof ScriptObject) && func.isNonStrictFunction()) {
    71             if (thiz == UNDEFINED || thiz == null) {
    71             if (thiz == UNDEFINED || thiz == null) {
    72                 return Global.instance();
    72                 return Global.instance();
    73             }
    73             }
    74             return JSType.toObject(Global.instance(), thiz);
    74             return JSType.toObject(Global.instance(), thiz);
    75         }
    75         }