8021164: REGRESSION: test262 failures after JDK-8021122
Reviewed-by: jlaskey, hannesw
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java Tue Jul 23 12:00:29 2013 -0300
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java Tue Jul 23 21:45:27 2013 +0530
@@ -41,6 +41,7 @@
import jdk.nashorn.api.scripting.ScriptObjectMirror;
import jdk.nashorn.internal.codegen.CompilerConstants.Call;
import jdk.nashorn.internal.codegen.RuntimeCallSite;
+import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.options.Options;
@@ -102,7 +103,7 @@
* @return true if the obj is an instance of @FunctionalInterface interface
*/
public static boolean isFunctionalInterfaceObject(final Object obj) {
- return obj != null && (NashornBottomLinker.getFunctionalInterfaceMethod(obj.getClass()) != null);
+ return !JSType.isPrimitive(obj) && (NashornBottomLinker.getFunctionalInterfaceMethod(obj.getClass()) != null);
}
/**