8021164: REGRESSION: test262 failures after JDK-8021122
authorsundar
Tue, 23 Jul 2013 21:45:27 +0530
changeset 19090 b5cf0f877326
parent 19089 51cfdcf21d35
child 19091 ed2bbb8fdcb3
child 19092 e23f2618ffde
8021164: REGRESSION: test262 failures after JDK-8021122 Reviewed-by: jlaskey, hannesw
nashorn/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
--- 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);
     }
 
     /**