From f14af88f11223d9413ab90b7efd70036b64e58ed Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Thu, 26 Aug 2010 01:22:20 -0400 Subject: [PATCH] Unwrap the target before checking for callability, so that wrappers don't wrongly appear to be callable. r=orange --- js/src/jsfun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 2744a4e98f34..245873fbabae 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -2575,7 +2575,7 @@ fun_bind(JSContext *cx, uintN argc, Value *vp) return false; /* Step 2. */ - if (!target->isCallable()) { + if (!target->wrappedObject(cx)->isCallable()) { if (JSString *str = js_ValueToString(cx, vp[1])) { if (const char *bytes = js_GetStringBytes(cx, str)) { JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,