From b0e9a748a19496ee205e7555b67f28c4973a98f0 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 30 Jan 2004 07:42:40 +0000 Subject: [PATCH] 2003/12/07 10:24:31 darcs-hash:20040130074240-0c9ea-c6cc221b4866ccac5c5070994e276e4a62775fed.gz --- src/org/xwt/js/Interpreter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/xwt/js/Interpreter.java b/src/org/xwt/js/Interpreter.java index 101b0af..be5755b 100644 --- a/src/org/xwt/js/Interpreter.java +++ b/src/org/xwt/js/Interpreter.java @@ -552,6 +552,9 @@ class Interpreter implements ByteCodes, Tokens { // Operations on Primitives ////////////////////////////////////////////////////////////////////// static Object callMethodOnPrimitive(Object o, Object method, Object arg0, Object arg1, Object arg2, Object[] rest, int alength) throws JSExn { + if (method == null || !(method instanceof String) || "".equals(method)) + throw new JSExn("attempt to call a non-existant method on a primitive"); + if (o instanceof Number) { //#switch(method) case "toFixed": throw new JSExn("toFixed() not implemented"); -- 1.7.10.4